Skip to content

Commit 992d7af

Browse files
authored
Handle '#' comments correctly and allow this script to run standalone
[ci skip]
1 parent 570cd59 commit 992d7af

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

tools/generate-excludelist.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22

33
set -e
44

5-
# download excludelist
6-
blacklisted=($(wget --quiet https://raw.githubusercontent.com/probonopd/AppImages/master/excludelist -O - | sort | uniq | grep -v "^#.*" | grep "[^-\s]"))
5+
# Download excludelist
6+
blacklisted=($(wget --quiet https://raw.githubusercontent.com/probonopd/AppImages/master/excludelist -O - | sort | uniq | cut -d '#' -f 1 | grep -v "^#.*" | grep "[^-\s]"))
77

8-
# sanity check
8+
# Sanity check
99
if [ "$blacklisted" == "" ]; then
1010
exit 1;
1111
fi
1212

13+
# If the linuxdeployqt source is not available locally, generate the file anyway
1314
filename=$(readlink -f $(dirname "$0"))/linuxdeployqt/excludelist.h
15+
if [ ! -e "$filename" ] ; then
16+
filename=$(readlink -f $(dirname "$0"))/linuxdeployqt/excludelist.h
17+
fi
1418

15-
# overwrite existing source file
19+
# Overwrite existing source file
1620
cat > "$filename" <<EOF
1721
/*
1822
* List of libraries to exclude for different reasons.

0 commit comments

Comments
 (0)