vanillia-modpack/update-pack.data/updater.sh

22 lines
592 B
Bash
Raw Normal View History

2021-11-30 21:50:16 +00:00
GITURL="https://github.com/git-for-windows/git/releases/download/v2.33.0.windows.1/PortableGit-2.33.0-64-bit.7z.exe"
#install git if not found
if [ ! -f "git/bin/git.exe" ]; then
if [ ! -d "temp" ]; then
mkdir temp
fi
if [ ! -f "temp/git.install.exe" ]; then
wget $GITURL -O temp/git.install.exe
fi
temp/git.install.exe -o git -y
fi
rm -rf temp
cd ../
update-pack.data/git/bin/git.exe config pull.rebase false
update-pack.data/git/bin/git.exe pull origin 1.18
update-pack.data/git/bin/git.exe branch -D main
echo "[$0] If there were any errors, please inform the Modpack Author"