Skip to content

Commit 26bdd6f

Browse files
authored
Update shipwright
1 parent d125a92 commit 26bdd6f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

programs/x86_64/shipwright

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# AM INSTALL SCRIPT VERSION 3.5
44
set -u
55
APP=shipwright
6-
SITE="mantralunar/Shipwright"
6+
SITE="HarbourMasters/Shipwright"
77

88
# CREATE DIRECTORIES AND ADD REMOVER
99
[ -n "$APP" ] && mkdir -p "/opt/$APP/tmp" "/opt/$APP/icons" && cd "/opt/$APP/tmp" || exit 1
@@ -12,10 +12,10 @@ printf '\n%s' "rm -f /usr/local/share/applications/$APP-AM.desktop" >> ../remove
1212
chmod a+x ../remove || exit 1
1313

1414
# DOWNLOAD AND PREPARE THE APP, $version is also used for updates
15-
version=$(curl -Ls https://api.github.com/repos/mantralunar/Shipwright/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
15+
version=$(curl -Ls https://api.github.com/repos/HarbourMasters/Shipwright/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | grep -i "download.*linux.*zip" | head -1)
1616
wget "$version" || exit 1
1717
# Keep this space in sync with other installation scripts
18-
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
18+
[ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
1919
cd ..
2020
mv ./tmp/*mage ./"$APP"
2121
# Keep this space in sync with other installation scripts
@@ -31,9 +31,9 @@ cat >> ./AM-updater << 'EOF'
3131
#!/bin/sh
3232
set -u
3333
APP=shipwright
34-
SITE="mantralunar/Shipwright"
34+
SITE="HarbourMasters/Shipwright"
3535
version0=$(cat "/opt/$APP/version")
36-
version=$(curl -Ls https://api.github.com/repos/mantralunar/Shipwright/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*mage$" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | head -1)
36+
version=$(curl -Ls https://api.github.com/repos/HarbourMasters/Shipwright/releases | sed 's/[()",{} ]/\n/g' | grep -oi "https.*" | grep -vi "i386\|i686\|aarch64\|arm64\|armv7l" | grep -i "download.*linux.*zip" | head -1)
3737
[ -n "$version" ] || { echo "Error getting link"; exit 1; }
3838
if command -v appimageupdatetool >/dev/null 2>&1; then
3939
cd "/opt/$APP" || exit 1
@@ -43,7 +43,7 @@ if [ "$version" != "$version0" ]; then
4343
mkdir "/opt/$APP/tmp" && cd "/opt/$APP/tmp" || exit 1
4444
notify-send "A new version of $APP is available, please wait"
4545
wget "$version" || exit 1
46-
# Use tar fx ./*tar* here for example in this line in case a compressed file is downloaded.
46+
[ -e ./*zip ] && unzip -qq ./*zip 1>/dev/null && rm -f ./*zip
4747
cd ..
4848
mv --backup=t ./tmp/*mage ./"$APP"
4949
chmod a+x ./"$APP" || exit 1
@@ -72,6 +72,6 @@ while [ "$COUNT" -lt 10 ]; do # Tries to get the actual icon/desktop if it is a
7272
[ ! -L ./"$APP".desktop ] && [ ! -L ./DirIcon ] && break
7373
COUNT=$((COUNT + 1))
7474
done
75-
sed -i "s#Exec=[^ ]*#Exec=$APP#g; s#Icon=.*#Icon=/opt/$APP/icons/$APP#g" ./"$APP".desktop
75+
sed -i "s#Exec=[^ ]*#Exec=$APP#g; s#Icon=.*#Icon=/opt/$APP/icons/$APP#g; s# --no-sandbox##g" ./"$APP".desktop
7676
mv ./"$APP".desktop /usr/local/share/applications/"$APP"-AM.desktop && mv ./DirIcon ./icons/"$APP" 1>/dev/null
7777
rm -R -f ./squashfs-root

0 commit comments

Comments
 (0)