diff options
Diffstat (limited to 'pkgbuild-check-nonfree')
-rwxr-xr-x | pkgbuild-check-nonfree | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/pkgbuild-check-nonfree b/pkgbuild-check-nonfree index 55976a8..fd7b69e 100755 --- a/pkgbuild-check-nonfree +++ b/pkgbuild-check-nonfree @@ -19,6 +19,8 @@ # You should have received a copy of the GNU General Public License # along with Parabola. If not, see <http://www.gnu.org/licenses/>. +source /etc/libretools.conf + function in_array { # usage : in_array( $needle, $haystack ) [[ $2 ]] || return 1 # Not found @@ -30,10 +32,9 @@ function in_array { # usage : in_array( $needle, $haystack ) return 1 # Not Found } - function get_blacklist { # Download the blacklist. - pushd $XDG_CONFIG_HOME/libretools/ >/dev/null + pushd "$XDG_CONFIG_HOME/libretools" >/dev/null msg "Downloading the blacklist of proprietary software packages." wget -N -q -O blacklist.txt "${BLACKLIST}" 2>/dev/null || { [ -e $XDG_CONFIG_HOME/libretools/blacklist.txt ] || { @@ -47,7 +48,7 @@ function get_blacklist { # Download the blacklist. function check_deps { # Check wheter a package depends on non-free - pushd $XDG_CONFIG_HOME/libretools/ >/dev/null + pushd "$XDG_CONFIG_HOME/libretools/" >/dev/null local unfree=($(cut -d: -f1 blacklist.txt)) # pkgname:free-replacement:comments local freerep=($(cut -d: -f2 blacklist.txt)) # pkgname:free-replacement:comments popd >/dev/null @@ -72,8 +73,6 @@ function check_deps { # Check wheter a package depends on non-free done } -source /etc/libretools.conf - if [ -e $XDG_CONFIG_HOME/libretools/libretools.conf ]; then source $XDG_CONFIG_HOME/libretools/libretools.conf fi @@ -89,7 +88,7 @@ else fi if [ ! -d "$XDG_CONFIG_HOME/libretools" ]; then - mkdir -p $XDG_CONFIG_HOME/libretools + mkdir -p "$XDG_CONFIG_HOME/libretools" fi get_blacklist |