|
|
@ -2,6 +2,8 @@ |
|
|
|
|
|
|
|
set -Eeuo pipefail |
|
|
|
|
|
|
|
if [[ $(stat -c %u /opt/miaou-bash) -eq 0 ]]; then |
|
|
|
|
|
|
|
if [[ -d /opt/miaou-bash ]]; then |
|
|
|
local_release=$(cat /opt/miaou-bash/.semver_git_tag) |
|
|
|
fi |
|
|
@ -16,3 +18,15 @@ if [[ $local_release != $remote_release ]]; then |
|
|
|
else |
|
|
|
echo " up-to-date!" |
|
|
|
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 |