1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-23 08:18:51 -05:00

* Added quoting on several makepkg paths that were lacking it.

This commit is contained in:
Dan McGee 2007-03-18 23:09:50 +00:00
parent ff76c8c552
commit bd7b7e5f0c

View File

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