Browse Source

upgrade dev mode

main
pvincent 6 months ago
parent
commit
b12e42a788
  1. 14
      tools/upgrade-miaou-bash

14
tools/upgrade-miaou-bash

@ -2,6 +2,8 @@
set -Eeuo pipefail set -Eeuo pipefail
if [[ $(stat -c %u /opt/miaou-bash) -eq 0 ]]; then
if [[ -d /opt/miaou-bash ]]; then if [[ -d /opt/miaou-bash ]]; then
local_release=$(cat /opt/miaou-bash/.semver_git_tag) local_release=$(cat /opt/miaou-bash/.semver_git_tag)
fi fi
@ -16,3 +18,15 @@ if [[ $local_release != $remote_release ]]; then
else else
echo " up-to-date!" echo " up-to-date!"
fi fi
else
echo DEVELOPMENT MODE detected!
if [[ $(stat -c %u /opt/miaou-bash) -eq $(id -u) ]]; then
cd /opt/miaou-bash
git pull
cd -
echo "git refreshed"
else
echo "please, ask user <$(stat -c %U /opt/miaou-bash)> to perform a git refresh!"
exit 1
fi
fi
Loading…
Cancel
Save