Skip to content

Commit 6191760

Browse files
authored
refactor2
1 parent a090ee7 commit 6191760

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

htop-appimage.sh

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,24 @@ mkdir -p ./AppDir
1515
cd ./AppDir
1616

1717
# DOWNLOAD AND BUILD HTOP
18-
CURRENTDIR="$(dirname "$(readlink -f "$0")")" # DO NOT MOVE THIS
1918
HTOP_URL=$(wget -q https://api.github.com/repos/htop-dev/htop/releases -O - \
2019
| sed 's/[()",{} ]/\n/g' | grep -oi 'https.*releases.*htop.*tar.xz' | head -1)
2120

22-
wget "$HTOP_URL"
23-
tar fx ./*.tar.*
21+
wget "$HTOP_URL" -O ./htop.tar.xz
2422

25-
cd ./htop*
26-
./autogen.sh
27-
./configure --prefix="$CURRENTDIR" --enable-sensors --enable-static
28-
make
29-
make install
30-
cd ..
23+
tar fx ./htop.tar.xz && (
24+
cd ./htop*
25+
./autogen.sh
26+
./configure --prefix="$(readlink -f ../)" --enable-sensors --enable-static
27+
make
28+
make install
29+
)
3130
rm -rf ./htop* ./*.tar.*
3231

3332
# PREPARE APPIMAGE
34-
cp -v ./share/applications/*.desktop ./
35-
cp -v ./share/pixmaps/* ./htop.png
36-
cp -v ./share/pixmaps/* ./.DirIcon
33+
cp -v ./share/applications/htop.desktop ./
34+
cp -v ./share/pixmaps/htop.png ./
35+
cp -v ./share/pixmaps/htop.png ./.DirIcon
3736

3837
ln -s ./bin/htop ./AppRun
3938
chmod +x ./bin/htop

0 commit comments

Comments
 (0)