Skip to content
This repository has been archived by the owner on Apr 14, 2024. It is now read-only.

Commit

Permalink
curl.sh: Preserve usercreds before clone
Browse files Browse the repository at this point in the history
  • Loading branch information
Shra1V32 committed Jan 8, 2023
1 parent 9121488 commit 5f42511
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions curl.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,40 @@ RED='\033[0;31m'
NC='\033[0m'

if [[ $OSTYPE == 'linux-android'* && $(echo "$TERMUX_VERSION" | cut -c 3-5) -ge "117" ]]; then
dpkg -s git >> /dev/null 2>&1 || pkg install git -y
git clone https://github.com/Shra1V32/TataSky-Playlist-AutoUpdater || { rm -rf TataSky-Playlist-AutoUpdater; git clone https://github.com/Shra1V32/TataSky-Playlist-AutoUpdater; }
cd TataSky-Playlist-AutoUpdater;
dpkg -s git >>/dev/null 2>&1 || pkg install git -y
git clone https://github.com/Shra1V32/TataSky-Playlist-AutoUpdater || {
FILES='.tplaycreds .usercreds userDetails.json'
for i in $FILES; do
cp -frp "TataSky-Playlist-AutoUpdater/$i" .
done
rm -rf TataSky-Playlist-AutoUpdater
git clone https://github.com/Shra1V32/TataSky-Playlist-AutoUpdater
for i in $FILES; do
cp "$i" "TataSky-Playlist-AutoUpdater/"
done
}
cd TataSky-Playlist-AutoUpdater
./main.sh

elif [[ $OSTYPE == 'linux-gnu'* ]]; then
dpkg -s git >> /dev/null 2>&1 || sudo apt install git -y
git clone https://github.com/Shra1V32/TataSky-Playlist-AutoUpdater || { rm -rf TataSky-Playlist-AutoUpdater; git clone https://github.com/Shra1V32/TataSky-Playlist-AutoUpdater; }
cd TataSky-Playlist-AutoUpdater;
dpkg -s git >>/dev/null 2>&1 || sudo apt install git -y
git clone https://github.com/Shra1V32/TataSky-Playlist-AutoUpdater || {
FILES='.tplaycreds .usercreds userDetails.json'
for i in $FILES; do
cp -frp "TataSky-Playlist-AutoUpdater/$i" .
done
rm -rf TataSky-Playlist-AutoUpdater
git clone https://github.com/Shra1V32/TataSky-Playlist-AutoUpdater
for i in $FILES; do
cp "$i" "TataSky-Playlist-AutoUpdater/"
done
}
cd TataSky-Playlist-AutoUpdater
./main.sh
elif [[ $(echo "$TERMUX_VERSION" | cut -c 3-5) -le "117" ]]; then
echo -e "Please use Latest Termux release, i.e, from FDroid (https://f-droid.org/en/packages/com.termux/)";
exit 1;
echo -e "Please use Latest Termux release, i.e, from FDroid (https://f-droid.org/en/packages/com.termux/)"
exit 1
else
echo "Platform not supported"
exit 1;
exit 1
fi

0 comments on commit 5f42511

Please sign in to comment.