Skip to content

Commit 932fcab

Browse files
Make script directory-independent
1 parent fb622fe commit 932fcab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

vnc-software/download_tigervnc.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/sh
22

3+
# Execute with containing directory as current working directory
4+
mydir=$(readlink -f "$0")
5+
mydir=$(dirname "$mydir")
6+
cd "$mydir"
7+
38
# Download link obtained from https://sourceforge.net/projects/tigervnc/
49
outfile=tigervnc-latest-stable.tar.gz
510

@@ -8,3 +13,6 @@ tar xf "$outfile" && \
813
rm -rf tigervnc-linux-x86_64 && \
914
mv tigervnc-1.13.1.x86_64 tigervnc-linux-x86_64 && \
1015
rm "$outfile"
16+
17+
# Go back to original directory
18+
cd -

0 commit comments

Comments
 (0)