aboutsummaryrefslogtreecommitdiffstats
path: root/lbu.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-08-11 06:28:16 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-11 07:54:58 +0000
commit2eead233b82949c359e5659de1d91635d7921750 (patch)
tree1b86a04e737d910b1bfe149c932621a959caf7a4 /lbu.in
parenta6560d28d30b54d9a7d52c3171a80458537e8a44 (diff)
downloadalpine-conf-2eead233b82949c359e5659de1d91635d7921750.tar.bz2
alpine-conf-2eead233b82949c359e5659de1d91635d7921750.tar.xz
lbu: do not edit users config
Cope with empty lines in include/exclude without editing the file ref #713 (cherry picked from commit 8d795d1760f28bedfe605515c7c770389768b5fb) Conflicts: lbu.in
Diffstat (limited to 'lbu.in')
-rw-r--r--lbu.in16
1 files changed, 13 insertions, 3 deletions
diff --git a/lbu.in b/lbu.in
index 70ce6b9..5d74b3d 100644
--- a/lbu.in
+++ b/lbu.in
@@ -265,7 +265,7 @@ cmd_package() {
local rc=0
local owd="$PWD"
local suff="apkovl.tar.gz"
- local tmpdir tmppkg
+ local tmpdir tmppkg tmpexclude tmpinclude
check_openssl
init_tmpdir tmpdir
@@ -284,6 +284,8 @@ cmd_package() {
fi
tmppkg="$tmpdir/$(basename $pkg)"
+ tmpexclude="$tmpdir"/exclude
+ tmpinclude="$tmpdir"/include
cd "${ROOT:-/}"
# remove old package.list
@@ -293,8 +295,16 @@ cmd_package() {
rm -f etc/lbu/packages.list
fi
# create tar archive
- [ -f "$EXCLUDE_LIST" ] && excl="-X $EXCLUDE_LIST"
- [ -f "$INCLUDE_LIST" ] && incl="-T $INCLUDE_LIST"
+ if [ -f "$EXCLUDE_LIST" ]; then
+ # strip empty lines and lines with only whitespace
+ sed -e '/^[[:space:]]*$/d' "$EXCLUDE_LIST" > $tmpexclude
+ excl="-X $tmpexclude"
+ fi
+ if [ -f "$INCLUDE_LIST" ]; then
+ # strip empty lines and lines with only whitespace
+ sed -e '/^[[:space:]]*$/d' "$INCLUDE_LIST" > $tmpinclude
+ incl="-T $tmpinclude"
+ fi
if [ -n "$VERBOSE" ]; then
echo "Archiving the following files:" >&2
# we dont want to mess the tar output with the