@@ -193,23 +193,27 @@ echo "# Checking the updates in https://github.com/openoms/joininbox"
193193cd /home/joinmarket/joininbox
194194# fetch latest master
195195sudo -u joinmarket git fetch
196- # unset $1
197- set --
198- UPSTREAM=${1:- ' @{u}' }
199- LOCAL=$( git rev-parse @)
200- REMOTE=$( git rev-parse " $UPSTREAM " )
201- if [ $LOCAL = $REMOTE ]; then
202- TAG=$( git tag | sort -V | tail -1)
203- echo " # You are up-to-date on version" $TAG
196+ if [ " $1 " = " commit" ]; then
197+ TAG=$( git describe --tags)
198+ echo " # Updating to the latest commit in the default branch:"
199+ echo " # $TAG "
204200else
205- echo " # Pulling latest changes..."
206- sudo -u joinmarket git pull -p
207- echo " # Reset to the latest release tag"
208201 TAG=$( git tag | sort -V | tail -1)
209- sudo -u joinmarket git reset --hard $TAG
210- echo " # Updated to version" $TAG
202+ # unset $1
203+ set --
204+ UPSTREAM=${1:- ' @{u}' }
205+ LOCAL=$( git rev-parse @)
206+ REMOTE=$( git rev-parse " $UPSTREAM " )
207+ if [ $LOCAL = $REMOTE ]; then
208+ echo " # You are up-to-date on version" $TAG
209+ else
210+ echo " # Pulling latest changes..."
211+ sudo -u joinmarket git pull -p
212+ echo " # Reset to the latest release tag"
213+ sudo -u joinmarket git reset --hard $TAG
214+ echo " # Updated to version" $TAG
215+ fi
211216fi
212-
213217echo " # Copying the scripts in place"
214218sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/* .* /home/joinmarket/
215219sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/.* /home/joinmarket/ 2> /dev/null
0 commit comments