summaryrefslogtreecommitdiff
path: root/pkgbuild-check-nonfree
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-09-21 13:27:02 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-09-21 13:27:02 -0300
commit4c4f7255e97bde5524e3798b4b777a94e37da23d (patch)
tree64a28f2efb14473b10798d17b513bd398bdbff1e /pkgbuild-check-nonfree
parent6082f831bbacb174c050915d3b301910fb2ea261 (diff)
parent0663c0c58a8d04a35f5ba9ab6de068a3f6c09b40 (diff)
Merge branch 'master' into fauno
Diffstat (limited to 'pkgbuild-check-nonfree')
-rwxr-xr-xpkgbuild-check-nonfree11
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