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

Commit ad6ffeb

Browse files
committed
preparing update version
1 parent b2579f5 commit ad6ffeb

File tree

4 files changed

+61
-352
lines changed

4 files changed

+61
-352
lines changed

new.sh

Lines changed: 0 additions & 178 deletions
This file was deleted.

run.sh

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
#!/bin/bash
22
# Author of the script : powen
33

4+
# Get Arch
5+
ARCH=$(uname -m)
6+
NETMUXD_AVAILABLE_ARCHS=("x86_64")
7+
NETMUXD_IS_AVAILABLE=0
8+
NETMUXD_IS_ON=0
9+
410
# Check source and permission
511
cd "$(dirname "$0")" || exit
612
echo "Checking source"
13+
if [[ ! -e "AltServer" ]]; then
14+
curl -L https://github.com/NyaMisty/AltServer-Linux/releases/download/v0.0.5/AltServer-"$ARCH" > AltServer
15+
fi
716
if [[ ! -e "AltStore.ipa" ]]; then
8-
curl -L https://cdn.altstore.io/file/altstore/apps/altstore/1_4_9.ipa > AltStore.ipa
17+
curl -L https://cdn.altstore.io/file/altstore/apps/altstore/1_5_1.ipa > AltStore.ipa
918
fi
1019
if [[ ! -e "main" ]]; then
1120
wget https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/main
1221
fi
22+
if [[ ! -e "netmuxd" && ${NETMUXD_AVAILABLE_ARCHS[*]} =~ ${ARCH} ]]; then
23+
curl -L https://github.com/jkcoxson/netmuxd/releases/download/v0.1.2/netmuxd-"$ARCH" > netmuxd
24+
fi
1325
if [[ ! -e "ipa" ]]; then
1426
mkdir ipa
1527
fi
@@ -22,6 +34,9 @@ fi
2234
if [[ "stat AltServer | grep -- '-rw-r--r--'" != "" ]] ; then
2335
chmod +x AltServer
2436
fi
37+
if [[ "stat netmuxd | grep -- '-rw-r--r--'" != "" ]] ; then
38+
chmod +x netmuxd
39+
fi
2540

2641
# Version
2742
LocalVersion=$(sed -n 1p version)
@@ -42,8 +57,10 @@ OPTIONS
4257
4358
i, --Install AltStore or ipa files
4459
Install AltStore or ipa files to your device
45-
d, --Restart Daemon mode
46-
Restart Daemon mode to refresh apps or AltStore
60+
w, --Switch to wifi Daemode mode (Default using it after launch)
61+
Switch and restart to wifi Daemode mode to refresh apps or AltStore
62+
t, --Switch to usb tethered Daemode mode
63+
Switch and restart to usb tethered Daemode mode to refresh apps or AltStore
4764
e, --Exit
4865
Exit script
4966
h, --Help
@@ -89,9 +106,14 @@ fi
89106
}
90107

91108
# Start script
92-
AltServerIcon
109+
110+
# AltServerIcon
93111
HELP
94112
UpdateNotification
113+
if [[ ${NETMUXD_AVAILABLE_ARCHS[*]} =~ ${ARCH} ]]; then
114+
NETMUXD_IS_AVAILABLE=1
115+
sudo -b -S ./netmuxd
116+
fi
95117

96118
./AltServer &> /dev/null &
97119

@@ -102,23 +124,45 @@ while [ $RunScript = 0 ] ; do
102124
case "$option" in
103125

104126
i|--Install-AltStore-or-ipa-files )
127+
export "NETMUXD_IS_ON"=$NETMUXD_IS_ON
105128
./main
106129
;;
107-
d|--Restart-Daemon-mode )
130+
w|--Switch-to-wifi-Daemon-mode )
131+
if [[ $NETMUXD_IS_AVAILABLE == 1 ]]; then
132+
killall AltServer
133+
sudo killall netmuxd
134+
NETMUXD_IS_ON=1
135+
for job in `jobs -p`
136+
do
137+
wait $job
138+
done
139+
sudo -b -S ./netmuxd
140+
./AltServer &> /dev/null &
141+
else
142+
echo "wifi-Daemon-mode is not available for your architecture"
143+
fi
144+
;;
145+
t|--Switch-to-usb-tethered-Daemode-mode )
108146
killall AltServer
147+
if [[ $NETMUXD_IS_AVAILABLE == 1 ]]; then
148+
sudo killall netmuxd
149+
NETMUXD_IS_ON=0
150+
fi
109151
for job in `jobs -p`
110152
do
111153
wait $job
112154
done
113-
114155
./AltServer &> /dev/null &
115156
;;
116157
e|--Exit )
117158
killall AltServer
159+
if [[ $NETMUXD_IS_AVAILABLE == 1 ]]; then
160+
sudo killall netmuxd
161+
fi
118162
exit
119163
;;
120164
h|--Help )
121-
AltServerIcon
165+
# AltServerIcon
122166
HELP
123167
UpdateNotification
124168
;;

update.sh

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
LocalVersion=$(sed -n 1p version)
55
LatestVersion=$(curl -Lsk 'https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/version')
6-
Arch=$(sed -n 2p version)
6+
ARCH=$(uname -m)
77
DIR=$(pwd)
88
if [[ $LatestVersion > $LocalVersion ]] ; then
9-
rm -rf AltStore.ipa main netmuxd
9+
rm -rf AltStore.ipa main netmuxd AltServer
1010
wget https://github.com/powenn/AltServer-Linux-ShellScript/raw/main/AltStore.ipa
11-
wget https://github.com/powenn/AltServer-Linux-ShellScript/releases/download/$LatestVersion/AltServer-$Arch.zip
12-
unzip -o AltServer-$Arch.zip
13-
cp -R ./AltServer-$Arch/* $DIR
14-
rm -rf AltServer-$Arch.zip AltServer-$Arch
11+
wget https://github.com/powenn/AltServer-Linux-ShellScript/releases/download/$LatestVersion/AltServer-$ARCH.zip
12+
unzip -o AltServer-$ARCH.zip
13+
cp -R ./AltServer-$ARCH/* $DIR
14+
rm -rf AltServer-$ARCH.zip AltServer-$ARCH
1515
chmod +x *.sh
1616
if [[ -e "AltServer" ]]; then
1717
chmod +x AltServer
@@ -21,21 +21,19 @@ if [[ $LatestVersion > $LocalVersion ]] ; then
2121
2222
What updated in version $LatestVersion ?
2323
Script:
24-
- support wifi refresh (only x64 currently)
25-
- x64 version have several modification , deleted 'd' option and added 'w' and 't'
24+
- Support wifi refresh (only x64 currently)
25+
- Codes improved
2626
AltStore:
27-
- Updated to 1.4.9
27+
- Updated to 1.5.1
2828
AltSerevr:
2929
- Fix Support for iOS 15
3030
- Updated to v0.0.5
3131
- with netmuxd ,you can do wifi refresh (only x64 currently)
3232
Others:
33-
- GUI edition is now available
34-
if interested,please check https://github.com/powenn/AltServer-LinuxGUI
3533
- please make sure you have install libavahi-compat-libdnssd-dev
3634
3735
For more information: https://github.com/powenn/AltServer-Linux-ShellScript
38-
<< PLease rerun the script to apply the new version >>
36+
<< PLease relaunch the script to apply the new version >>
3937
EOF
4038
fi
4139
if [[ $LatestVersion = $LocalVersion ]] ; then

0 commit comments

Comments
 (0)