I have a certain file UPDATE.sh. The task of this file is to update my program using git merge.
UPDATE.sh:
#!/usr/bin/env bash
git fetch https://xxxxx
newUpdatesAvailable=`git diff HEAD FETCH_HEAD`
if [[ "$newUpdatesAvailable" != "" ]]
then
git branch backup
git checkout backup
git add .
git add -u
git commit -m date "+%d.%m.%Y"
git checkout master
git merge FETCH_HEAD
else
echo "No updates..."
fi
I have to write the same thing but on Make syntax.
I tried to figure out the conditions in Make, but it didn't work out for me.
Please tell me how to write this correctly in Makefile without using:
update:
./UPDATE.sh