Get rid of downloaded API after update

This commit is contained in:
Davide 2024-11-27 19:27:13 +01:00
parent c0dc2181e3
commit fc711ae98f
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
2 changed files with 6 additions and 9 deletions

2
.gitignore vendored
View File

@ -15,9 +15,9 @@ templates/
vendor/
Preview.html
default.profraw
.api
.build
.bundle
.env.secret*
*.storekit
tmp
*.sqlite-*

View File

@ -1,15 +1,12 @@
#!/bin/bash
SOURCE=".api"
DESTINATION="Passepartout/Library/Sources/CommonAPI/API"
API_VERSION="v5"
mkdir tmp
cd tmp
if [[ ! `git clone https://github.com/passepartoutvpn/api --depth 1` ]]; then
cd api
git pull
fi
cd ../..
rm -rf $SOURCE
git clone https://github.com/passepartoutvpn/api --depth 1 $SOURCE
rm -rf $DESTINATION
mkdir -p $DESTINATION
cp -rp tmp/api/$API_VERSION $DESTINATION
mv $SOURCE/$API_VERSION $DESTINATION
rm -rf $SOURCE