Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
Add update notification
Browse files Browse the repository at this point in the history
  • Loading branch information
powenn committed Jan 26, 2022
1 parent 644f278 commit 65f4b55
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 17 deletions.
14 changes: 14 additions & 0 deletions AltServer-aarch64/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ fi
HasExistAccount=$(cat saved.txt)
UDID=$(lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2 | grep iSerial | awk '{print $3}')
HasExistipa=$(ls ipa)
LocalVersion=$(sed -n 1p version)
LatestVersion=$(curl -Lsk 'https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/version')


# Instruction
Expand Down Expand Up @@ -148,9 +150,21 @@ SaveAcccount() {
esac
}

# Show update avaliable message
UpdateNotification() {
if [[ $LatestVersion > $LocalVersion ]] ; then
cat << EOF
-------<< UPDATE AVALIABLE >>-------
EOF
fi
}

# Start script
AltServerIcon
cat help.txt
UpdateNotification
echo "Please connect to your device and press Enter to continue"
read key
idevicepair pair > /dev/null
Expand Down
2 changes: 1 addition & 1 deletion AltServer-aarch64/version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0.2.1
0.2.2
aarch64
14 changes: 14 additions & 0 deletions AltServer-armv7/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ fi
HasExistAccount=$(cat saved.txt)
UDID=$(lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2 | grep iSerial | awk '{print $3}')
HasExistipa=$(ls ipa)
LocalVersion=$(sed -n 1p version)
LatestVersion=$(curl -Lsk 'https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/version')


# Instruction
Expand Down Expand Up @@ -148,9 +150,21 @@ SaveAcccount() {
esac
}

# Show update avaliable message
UpdateNotification() {
if [[ $LatestVersion > $LocalVersion ]] ; then
cat << EOF
-------<< UPDATE AVALIABLE >>-------
EOF
fi
}

# Start script
AltServerIcon
cat help.txt
UpdateNotification
echo "Please connect to your device and press Enter to continue"
read key
idevicepair pair > /dev/null
Expand Down
2 changes: 1 addition & 1 deletion AltServer-armv7/version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0.2.1
0.2.2
armv7
14 changes: 14 additions & 0 deletions AltServer-x64/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ fi
HasExistAccount=$(cat saved.txt)
UDID=$(lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2 | grep iSerial | awk '{print $3}')
HasExistipa=$(ls ipa)
LocalVersion=$(sed -n 1p version)
LatestVersion=$(curl -Lsk 'https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/version')


# Instruction
Expand Down Expand Up @@ -151,9 +153,21 @@ SaveAcccount() {
esac
}

# Show update avaliable message
UpdateNotification() {
if [[ $LatestVersion > $LocalVersion ]] ; then
cat << EOF
-------<< UPDATE AVALIABLE >>-------
EOF
fi
}

# Start script
AltServerIcon
cat help.txt
UpdateNotification
echo "Please connect to your device and press Enter to continue"
read key
idevicepair pair > /dev/null
Expand Down
2 changes: 1 addition & 1 deletion AltServer-x64/version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
0.2.1
0.2.2
x64
14 changes: 14 additions & 0 deletions Test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ fi
HasExistAccount=$(cat saved.txt)
UDID=$(lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2 | grep iSerial | awk '{print $3}')
HasExistipa=$(ls ipa)
LocalVersion=$(sed -n 1p version)
LatestVersion=$(curl -Lsk 'https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/version')


# Instruction
Expand Down Expand Up @@ -148,9 +150,21 @@ SaveAcccount() {
esac
}

# Show update avaliable message
UpdateNotification() {
if [[ $LatestVersion > $LocalVersion ]] ; then
cat << EOF
-------<< UPDATE AVALIABLE >>-------
EOF
fi
}

# Start script
AltServerIcon
cat help.txt
UpdateNotification
echo "Please connect to your device and press Enter to continue"
read key
idevicepair pair > /dev/null
Expand Down
13 changes: 6 additions & 7 deletions Test/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ LocalVersion=$(sed -n 1p version)
LatestVersion=$(curl -Lsk 'https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/version')
Arch=$(sed -n 2p version)
DIR=$(pwd)
if [[ $LatestVersion != $LocalVersion ]] ; then
if [[ $LatestVersion > $LocalVersion ]] ; then
rm -rf AltStore.ipa
wget https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/AltStore.ipa
wget https://github.com/powenn/AltServer-Linux-ShellScript/releases/download/$LatestVersion/AltServer-$Arch.zip
unzip -o AltServer-$Arch.zip
cp -R ./AltServer-$Arch/* $DIR
rm -rf AltServer-$Arch.zip AltServer-$Arch
echo "Done"
elif [[ $LatestVersion = $LocalVersion ]] ; then
echo "you are using the latest release"
fi

cat << EOF
What updated in version $LatestVersion ?
Script:
- Added update option
- daemon mode improved
- Added update notification
- Improved update option
EOF
elif [[ $LatestVersion = $LocalVersion ]] ; then
echo "you are using the latest release"
fi
14 changes: 14 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ fi
HasExistAccount=$(cat saved.txt)
UDID=$(lsusb -v 2> /dev/null | grep -e "Apple Inc" -A 2 | grep iSerial | awk '{print $3}')
HasExistipa=$(ls ipa)
LocalVersion=$(sed -n 1p version)
LatestVersion=$(curl -Lsk 'https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/version')


# Instruction
Expand Down Expand Up @@ -148,9 +150,21 @@ SaveAcccount() {
esac
}

# Show update avaliable message
UpdateNotification() {
if [[ $LatestVersion > $LocalVersion ]] ; then
cat << EOF
-------<< UPDATE AVALIABLE >>-------
EOF
fi
}

# Start script
AltServerIcon
cat help.txt
UpdateNotification
echo "Please connect to your device and press Enter to continue"
read key
idevicepair pair > /dev/null
Expand Down
13 changes: 6 additions & 7 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,21 @@ LocalVersion=$(sed -n 1p version)
LatestVersion=$(curl -Lsk 'https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/version')
Arch=$(sed -n 2p version)
DIR=$(pwd)
if [[ $LatestVersion != $LocalVersion ]] ; then
if [[ $LatestVersion > $LocalVersion ]] ; then
rm -rf AltStore.ipa
wget https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/AltStore.ipa
wget https://github.com/powenn/AltServer-Linux-ShellScript/releases/download/$LatestVersion/AltServer-$Arch.zip
unzip -o AltServer-$Arch.zip
cp -R ./AltServer-$Arch/* $DIR
rm -rf AltServer-$Arch.zip AltServer-$Arch
echo "Done"
elif [[ $LatestVersion = $LocalVersion ]] ; then
echo "you are using the latest release"
fi

cat << EOF
What updated in version $LatestVersion ?
Script:
- Added update option
- daemon mode improved
- Added update notification
- Improved update option
EOF
elif [[ $LatestVersion = $LocalVersion ]] ; then
echo "you are using the latest release"
fi

0 comments on commit 65f4b55

Please sign in to comment.