2024-01-25 11:43:30 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-02-26 09:59:20 +00:00
|
|
|
export GIT_REPO=makeplane/plane
|
|
|
|
|
2024-02-08 06:17:52 +00:00
|
|
|
# Check if the user has sudo access
|
2024-01-25 12:51:21 +00:00
|
|
|
if command -v curl &> /dev/null; then
|
|
|
|
sudo curl -sSL \
|
|
|
|
-o /usr/local/bin/plane-app \
|
2024-02-26 09:59:20 +00:00
|
|
|
https://raw.githubusercontent.com/$GIT_REPO/${BRANCH:-master}/deploy/1-click/plane-app?token=$(date +%s)
|
2024-01-25 12:51:21 +00:00
|
|
|
else
|
|
|
|
sudo wget -q \
|
|
|
|
-O /usr/local/bin/plane-app \
|
2024-02-26 09:59:20 +00:00
|
|
|
https://raw.githubusercontent.com/$GIT_REPO/${BRANCH:-master}/deploy/1-click/plane-app?token=$(date +%s)
|
2024-01-25 11:43:30 +00:00
|
|
|
fi
|
|
|
|
|
2024-01-25 12:51:21 +00:00
|
|
|
sudo chmod +x /usr/local/bin/plane-app
|
2024-02-26 09:59:20 +00:00
|
|
|
sudo sed -i 's@export DEPLOY_BRANCH=${BRANCH:-master}@export DEPLOY_BRANCH='${BRANCH:-master}'@' /usr/local/bin/plane-app
|
|
|
|
sudo sed -i 's@CODE_REPO=${GIT_REPO:-makeplane/plane}@CODE_REPO='$GIT_REPO'@' /usr/local/bin/plane-app
|
2024-01-25 12:51:21 +00:00
|
|
|
|
2024-02-26 09:59:20 +00:00
|
|
|
plane-app -i #--help
|