summaryrefslogtreecommitdiff
path: root/src/abslibre-tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/abslibre-tools')
-rwxr-xr-xsrc/abslibre-tools/diff-unfree16
-rwxr-xr-xsrc/abslibre-tools/libreaddiff3
-rwxr-xr-xsrc/abslibre-tools/libredbdiff4
3 files changed, 13 insertions, 10 deletions
diff --git a/src/abslibre-tools/diff-unfree b/src/abslibre-tools/diff-unfree
index 15fd197..3670f7f 100755
--- a/src/abslibre-tools/diff-unfree
+++ b/src/abslibre-tools/diff-unfree
@@ -4,6 +4,7 @@
# Copyright (C) 2010-2011 Nicolás Reynolds <fauno@parabola.nu>
# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) <hahj87@gmail.com>
+# Copyright (C) 2017 Luke Shumaker <lukeshu@sbcglobal.net>
#
# License: GNU GPLv3+
#
@@ -41,8 +42,9 @@ main() {
exit 0
fi
+
local package_guess=${PWD##*/}
- local repo=${1:-$(basename ${PWD%/*})}
+ local repo=${1:-$(basename "${PWD%/*}")}
local package=${2:-${package_guess%-libre}}
local trunk=${3:-trunk}
@@ -59,7 +61,7 @@ main() {
fi
- tmp_dir="$(mktemp --tmpdir -d ${package}.XXXXXX)"
+ tmp_dir="$(mktemp --tmpdir -d "${package}.XXXXXX")"
if [[ ! -d "${tmp_dir}" ]]; then
error "Can't create temp dir"
exit 1
@@ -70,19 +72,19 @@ main() {
msg "Getting diff from %s..." "$repo/$package"
- svn checkout --depth=empty svn://svn.archlinux.org/$svnrepo &>/dev/null
+ svn checkout --depth=empty "svn://svn.archlinux.org/$svnrepo" &>/dev/null
- cd ${svnrepo}
- svn update ${package}
+ cd "${svnrepo}"
+ svn update "${package}"
# Back to start dir
popd &>/dev/null
msg "Diffing files"
- for _file in ${unfree_dir}/*; do
+ for _file in "${unfree_dir}"/*; do
msg2 "%s" "$(basename "${_file}")"
- ${DIFFPROG} "$PWD/$(basename "${_file}")" "${_file}"
+ "${DIFFPROG}" "$PWD/$(basename "${_file}")" "${_file}"
done
}
diff --git a/src/abslibre-tools/libreaddiff b/src/abslibre-tools/libreaddiff
index afd1c98..17e808b 100755
--- a/src/abslibre-tools/libreaddiff
+++ b/src/abslibre-tools/libreaddiff
@@ -3,6 +3,7 @@
# Copyright (C) 2011-2012 Michał Masłowski <mtjm@mtjm.eu>
# Copyright (C) 2012 Daniel Molina (lluvia)
+# Copyright (C) 2017 Luke Shumaker <lukeshu@sbcglobal.net>
#
# License: GNU GPLv3+
#
@@ -61,7 +62,7 @@ try:
line = next(it)
if line == "%ARCH%\n":
arch = next(it)
- if arch == "'"$arch"'\n" or "'$repo'" not in '"$archrepos"':
+ if arch == "'"$arch"'\n" or "'"$repo"'" not in '"$archrepos"':
print("%s-%s" % (name.strip(), version.strip()))
if line == "%NAME%\n":
name = next(it)
diff --git a/src/abslibre-tools/libredbdiff b/src/abslibre-tools/libredbdiff
index 54b386e..24d285e 100755
--- a/src/abslibre-tools/libredbdiff
+++ b/src/abslibre-tools/libredbdiff
@@ -2,7 +2,7 @@
name="Libredbdiff"
# Copyright (C) 2014 Esteban Carnevale <alfplayer@mailoo.org>
-# Copyright (C) 2014 Luke Shumaker <lukeshu@sbcglobal.net>
+# Copyright (C) 2014, 2017 Luke Shumaker <lukeshu@sbcglobal.net>
#
# License: GNU GPLv3+
#
@@ -160,7 +160,7 @@ initialize() {
repo_test() {
for repo in ${repos} ; do
- if [[ $repo == $1 ]] ; then
+ if [[ $repo == "$1" ]] ; then
found=1
return 0
fi