summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/makepkg36
1 files changed, 18 insertions, 18 deletions
diff --git a/scripts/makepkg b/scripts/makepkg
index e19d5426..5525cdba 100755
--- a/scripts/makepkg
+++ b/scripts/makepkg
@@ -245,8 +245,8 @@ handledeps() {
fi
success=0
for pkgdir in $candidates; do
- if [ -f $pkgdir/$BUILDSCRIPT ]; then
- cd $pkgdir
+ if [ -f "$pkgdir/$BUILDSCRIPT" ]; then
+ cd "$pkgdir"
if [ "$RMDEPS" = "1" ]; then
makepkg -i -c -b -r -w $PKGDEST
else
@@ -541,11 +541,11 @@ if [ -z "$pkgrel" ]; then
error "pkgrel is not allowed to be empty."
exit 1
fi
-if [ $(echo $pkgver | grep '-') ]; then
+if [ $(echo "$pkgver" | grep '-') ]; then
error "pkgver is not allowed to contain hyphens."
exit 1
fi
-if [ $(echo $pkgrel | grep '-') ]; then
+if [ $(echo "$pkgrel" | grep '-') ]; then
error "pkgrel is not allowed to contain hyphens."
exit 1
fi
@@ -561,7 +561,7 @@ if [ "$install" -a ! -f "$install" ]; then
exit 1
fi
-if [ -f $PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.${PKGEXT} \
+if [ -f "$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}.${PKGEXT}" \
-a "$FORCE" = "0" -a "$GENINTEG" = "0" ]; then
if [ "$INSTALL" = "1" ]; then
warning "a package has already been built, installing existing package."
@@ -630,12 +630,12 @@ else
warning "pacman was not found in PATH. skipping dependency checks."
fi
-cd $startdir
+cd "$startdir"
# retrieve sources
msg "Retrieving Sources..."
mkdir -p src
-cd $startdir/src
+cd "$startdir/src"
for netfile in ${source[@]}; do
file=$(strip_url "$netfile")
if [ -f "../$file" ]; then
@@ -810,7 +810,7 @@ else
if [ "$EUID" = "0" ]; then
# chown all source files to root.root
- chown -R root.root $startdir/src
+ chown -R root.root "$startdir/src"
fi
fi
@@ -821,11 +821,11 @@ elif [ "$REPKG" = "1" ]; then
warning "Skipping build"
else
# check for existing pkg directory
- if [ -d $startdir/pkg ]; then
+ if [ -d "$startdir/pkg" ]; then
msg "Removing existing pkg/ directory..."
- rm -rf $startdir/pkg
+ rm -rf "$startdir/pkg"
fi
- mkdir -p $startdir/pkg
+ mkdir -p "$startdir/pkg"
# use distcc if it is requested (check buildenv and PKGBUILD opts)
if [ "$(check_buildenv distcc)" = "y" -a "$(check_option distcc)" != "n" ]; then
@@ -896,14 +896,14 @@ fi
if [ "$(check_option docs)" = "n" ]; then
# remove info/doc files
msg "Removing info/doc files..."
- cd $startdir/pkg
+ cd "$startdir/pkg"
#fix flyspray bug #5021
rm -rf ${DOC_DIRS[@]}
fi
# move /usr/share/man files to /usr/man
if [ -d $startdir/pkg/usr/share/man ]; then
- cd $startdir
+ cd "$startdir"
mkdir -p pkg/usr/man
cp -a pkg/usr/share/man/* pkg/usr/man/
rm -rf pkg/usr/share/man
@@ -911,12 +911,12 @@ fi
# compress man pages
msg "Compressing man pages..."
-find $startdir/pkg/{usr{,/local},opt/*}/man -type f 2>/dev/null | while read i ; do
+find "$startdir"/pkg/{usr{,/local},opt/*}/man -type f 2>/dev/null | while read i ; do
ext="${i##*.}"
fn="${i##*/}"
if [ "$ext" != "gz" -a "$ext" != "bz2" ]; then
# update symlinks to this manpage
- find $startdir/pkg/{usr{,/local},opt/*}/man -lname "$fn" 2> /dev/null | while read ln ; do
+ find "$startdir"/pkg/{usr{,/local},opt/*}/man -lname "$fn" 2> /dev/null | while read ln ; do
rm -f "$ln"
ln -sf "${fn}.gz" "${ln}.gz"
done
@@ -925,7 +925,7 @@ find $startdir/pkg/{usr{,/local},opt/*}/man -type f 2>/dev/null | while read i ;
fi
done
-cd $startdir
+cd "$startdir"
# strip binaries
if [ "$(check_option strip)" = "y" ]; then
@@ -959,7 +959,7 @@ if [ "$PACKAGER" != "" ]; then
else
packager="Arch Linux (http://www.archlinux.org)"
fi
-size=$(du -cb $startdir/pkg | tail -n 1 | awk '{print $1}')
+size=$(du -cb "$startdir/pkg" | tail -n 1 | awk '{print $1}')
# build a filelist - do this first to keep meta files out of the list
msg "Generating .FILELIST file..."
@@ -968,7 +968,7 @@ tar cvf /dev/null * | sort >.FILELIST
# write the .PKGINFO file
msg "Generating .PKGINFO file..."
-cd $startdir/pkg
+cd "$startdir/pkg"
echo "# Generated by makepkg $myver" >.PKGINFO
echo -n "# " >>.PKGINFO
date >>.PKGINFO