shithub: aubio

Download patch

ref: c31b589dcbb769b010af802724a2303eeca7899a
parent: a89ed31d00bd62ce7a9d48ca42822f60fa2eca3d
author: Paul Brossier <piem@piem.org>
date: Mon Apr 25 21:26:47 EDT 2016

scripts/build_apple_frameworks: escape PWD and OLDPWD to build from a path with a space (closes #43)

--- a/scripts/build_apple_frameworks
+++ b/scripts/build_apple_frameworks
@@ -6,7 +6,7 @@
 VERSION=$AUBIO_MAJOR_VERSION.$AUBIO_MINOR_VERSION.$AUBIO_PATCH_VERSION$AUBIO_VERSION_STATUS
 LIBVERSION=$LIBAUBIO_LT_CUR.$LIBAUBIO_LT_REV.$LIBAUBIO_LT_AGE
 OUTPUTDIR=$PWD/dist
-mkdir -p $OUTPUTDIR
+mkdir -p "$OUTPUTDIR"
 # add git abbreviated commit hash
 #VERSION+=+$(git log --pretty=format:"%h" -1)
 
@@ -25,7 +25,7 @@
   # name version platform
   # create tarball
   tarfile=$OUTPUTDIR/$1-$2.$3_binary.tar.bz2
-  tar -C $AUBIO_TMPDIR/dist-$3/ -jcf $tarfile .
+  tar -C $AUBIO_TMPDIR/dist-$3/ -jcf "$tarfile" .
   #rm -rf $AUBIO_TMPDIR/dist-$3
 }
 
@@ -34,11 +34,11 @@
   mkdir -p $AUBIO_TMPDIR/framework-$3/$1-$2.$3_framework/$1.framework
   cp -pr COPYING README.md $AUBIO_TMPDIR/framework-$3/$1-$2.$3_framework
   pushd $AUBIO_TMPDIR/framework-$3
-  cp -pr $OLDPWD/build/src/lib$1.a $1-$2.$3_framework/$1.framework/$1 || \
+  cp -pr "$OLDPWD/build/src/lib$1.a" $1-$2.$3_framework/$1.framework/$1 || \
     cp -pr $AUBIO_TMPDIR/dist-$3/usr/local/lib/lib$1.$LIBVERSION.dylib \
     $AUBIO_TMPDIR/framework-$3/$1-$2.$3_framework/$1.framework/$1
   cp -pr $AUBIO_TMPDIR/dist-$3/usr/local/include/$1 $1-$2.$3_framework/$1.framework/Headers
-  cp -pr $OLDPWD/scripts/apple/Modules $1-$2.$3_framework/$1.framework/
+  cp -pr "$OLDPWD/scripts/apple/Modules" $1-$2.$3_framework/$1.framework/
   popd
 }
 
@@ -61,7 +61,7 @@
   zipfile=$1-$2.$3_framework.zip
   zip -qr $zipfile $1-$2.$3_framework
   popd
-  mv $AUBIO_TMPDIR/framework-$3/$zipfile $OUTPUTDIR
+  mv $AUBIO_TMPDIR/framework-$3/$zipfile "$OUTPUTDIR"
 }
 
 set -x