folder=$(echo $PWD) ; filepath=$folder/../../.git/refs/heads/master; while true do cd ../../ git pull cd ./sh/automake VERSIONCODE=$(cat $folder/../../../modularization_exe/agx/appversion.md) echo "app version: "$VERSIONCODE GITVERSIONCODE="unknown" if [ -f "$filepath" ]; then gitversion=$(cat $folder/../../.git/refs/heads/master) # echo $gitversion GITVERSIONCODE=$gitversion fi echo "code version: "$GITVERSIONCODE if [ "$GITVERSIONCODE" = "$VERSIONCODE" ]; then sleep 1s else VERSIONCODE=$GITVERSIONCODE ./autogen.sh ./autodeploy.sh cd ../../deploy zip -r app.zip app cd ../../modularization_exe git pull cd ../modularization/deploy cp app.zip ../../modularization_exe/agx cd ../../modularization_exe/agx cat /dev/null > appversion.md echo "$VERSIONCODE" >> appversion.md cd .. git add -u git commit -m "automake change app.zip" git push cd ../modularization/sh/automake fi sleep 10m done