-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathpackage
More file actions
executable file
·59 lines (44 loc) · 1.14 KB
/
package
File metadata and controls
executable file
·59 lines (44 loc) · 1.14 KB
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
#!/bin/sh
add()
{
echo "adding $1"
if [ -e "/usr/lib/x86_64-linux-gnu/$1" ]; then
src="/usr/lib/x86_64-linux-gnu"
elif [ -e "/usr/lib/x86_64-linux-gnu/pulseaudio/$1" ]; then
src="/usr/lib/x86_64-linux-gnu/pulseaudio"
elif [ -e "/usr/lib64/$1" ]; then
src="/usr/lib64"
fi
if [ $src != $out ]; then
cp "$src/$1" "$out/$1"
fi
dependencies=$(readelf -d "$src/$1" | grep NEEDED | sed -En "s/[^\[]*\[([^]]*)\S*/\1/gp")
for dependency in $dependencies
do
if [ ! -f "$out/$dependency" ]; then
add $dependency
fi
done
}
out=$(pwd)
src=$(pwd)
add "dotto"
rm libc.so*
rm libpthread.so*
rm librt.so*
rm libstdc++.so*
chmod +x dotto
mkdir Dotto
mkdir Dotto/usr
mkdir Dotto/usr/bin
mkdir Dotto/usr/lib
mv data/Dotto.desktop Dotto
cp data/icon.png Dotto/dotto.png
mv dotto Dotto/usr/bin
mv data Dotto/usr/bin
mv *.so* Dotto/usr/lib
wget https://github.com/AppImage/AppImageKit/releases/download/13/AppRun-x86_64 -O Dotto/AppRun
chmod +x Dotto/AppRun
wget https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage -O appimagetool
chmod +x appimagetool
./appimagetool Dotto