forked from flathub/com.zerobrane.studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh.patch
64 lines (51 loc) · 2.05 KB
/
install.sh.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
--- ZeroBraneStudio-linux/install.sh 2023-02-05 07:59:53.853093618 +0200
+++ ZeroBraneStudio-linux/install.sh 2023-02-05 08:01:17.068087666 +0200
@@ -1,6 +1,6 @@
#!/bin/bash
-INSTALL_PATH=/opt/zbstudio
+INSTALL_PATH=/app/opt/zbstudio
VERSION=$1
@@ -11,38 +11,38 @@
echo "Copying cfg/user.lua file..."
cp "$INSTALL_PATH/cfg/user.lua" "app/cfg/user.lua"
fi
- sudo rm -r $INSTALL_PATH
+ rm -r $INSTALL_PATH
fi
-INITIAL_USER=`whoami`
-sudo mkdir -p $INSTALL_PATH
-sudo chown -R $INITIAL_USER $INSTALL_PATH
+mkdir -p $INSTALL_PATH
-sudo cp -rp app/* $INSTALL_PATH
+cp -rp app/* $INSTALL_PATH
for ICON_SIZE in 16 22 24 32 48 64 256
do
- sudo xdg-icon-resource install --novendor --size $ICON_SIZE $INSTALL_PATH/zbstudio/res/icons/${ICON_SIZE}x${ICON_SIZE}/apps/zbstudio.png "zbstudio"
+ mkdir -p /app/share/icons/hicolor/${ICON_SIZE}x${ICON_SIZE}/apps/
+ cp -rp $INSTALL_PATH/zbstudio/res/icons/${ICON_SIZE}x${ICON_SIZE}/apps/zbstudio.png /app/share/icons/hicolor/${ICON_SIZE}x${ICON_SIZE}/apps/com.zerobrane.studio.png
done
UPDATE_MENUS="`which update-menus 2>/dev/null`"
-sudo xdg-desktop-menu install --novendor $INSTALL_PATH/zbstudio/res/zbstudio.desktop
+cp -rp $INSTALL_PATH/zbstudio/res/zbstudio.desktop /app/share/applications/com.zerobrane.studio.desktop
+cp -rp $INSTALL_PATH/zbstudio/res/zbstudio.appdata.xml /app/share/appdata/com.zerobrane.studio.appdata.xml
if [ -x "$UPDATE_MENUS" ]; then
- sudo update-menus
+ update-menus
fi
-if [ -e "/usr/bin/zbstudio" ]; then
- sudo rm /usr/bin/zbstudio
+if [ -e "/app/bin/zbstudio" ]; then
+ rm /app/bin/zbstudio
fi
-sudo ln -s $INSTALL_PATH/zbstudio.sh /usr/bin/zbstudio
-sudo chmod +x $INSTALL_PATH/zbstudio.sh
+ln -s $INSTALL_PATH/zbstudio.sh /app/bin/zbstudio
+chmod +x $INSTALL_PATH/zbstudio.sh
-echo $VERSION | sudo tee $INSTALL_PATH/VERSION >/dev/null
+echo $VERSION | tee $INSTALL_PATH/VERSION >/dev/null
-sudo cp uninstall.sh /usr/bin/zbstudio-uninstall
-sudo chmod +x /usr/bin/zbstudio-uninstall
+cp uninstall.sh /app/bin/zbstudio-uninstall
+chmod +x /app/bin/zbstudio-uninstall
echo Done.
echo