Browse Source

excludelist: Return empty string if something goes wrong

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
master
Patrick José Pereira 7 years ago
parent
commit
7b7f603278
  1. 6
      tools/excludelist.sh

6
tools/excludelist.sh

@ -2,6 +2,12 @@
# Download excludelist # Download excludelist
blacklisted=($(wget --quiet https://raw.githubusercontent.com/probonopd/AppImages/master/excludelist -O - | sort | uniq | grep -v "^#.*" | grep "[^-\s]")) blacklisted=($(wget --quiet https://raw.githubusercontent.com/probonopd/AppImages/master/excludelist -O - | sort | uniq | grep -v "^#.*" | grep "[^-\s]"))
if [ -z $blacklisted ]; then
# Return nothing if no output from command
echo ""
exit
fi
# Create array # Create array
for item in ${blacklisted[@]:0:${#blacklisted[@]}-1}; do for item in ${blacklisted[@]:0:${#blacklisted[@]}-1}; do
echo -ne '\\"'$item'\\" << ' echo -ne '\\"'$item'\\" << '

Loading…
Cancel
Save