xbps-src: quote $wrksrc
Allows spaces in the directory name
This commit is contained in:
parent
9c34767b3e
commit
3c424a73f6
5 changed files with 11 additions and 11 deletions
|
@ -10,14 +10,14 @@ _process_patch() {
|
|||
elif [ -n "$patch_args" ]; then
|
||||
_args=$patch_args
|
||||
fi
|
||||
cp -f $i $wrksrc
|
||||
cp -f $i "$wrksrc"
|
||||
|
||||
# Try to guess if its a compressed patch.
|
||||
if [[ $f =~ .gz$ ]]; then
|
||||
gunzip $wrksrc/${_patch}
|
||||
gunzip "$wrksrc/${_patch}"
|
||||
_patch=${_patch%%.gz}
|
||||
elif [[ $f =~ .bz2$ ]]; then
|
||||
bunzip2 $wrksrc/${_patch}
|
||||
bunzip2 "$wrksrc/${_patch}"
|
||||
_patch=${_patch%%.bz2}
|
||||
elif [[ $f =~ .diff ]]; then
|
||||
:
|
||||
|
@ -28,7 +28,7 @@ _process_patch() {
|
|||
continue
|
||||
fi
|
||||
|
||||
cd $wrksrc
|
||||
cd "$wrksrc"
|
||||
patch -sl ${_args} -i ${_patch} 2>/dev/null
|
||||
msg_normal "$pkgver: patch applied: ${_patch}.\n"
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ if [ -f "$XBPS_BUILD_DONE" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
cd $wrksrc || msg_error "$pkgver: cannot access wrksrc directory [$wrksrc]\n"
|
||||
cd "$wrksrc" || msg_error "$pkgver: cannot access wrksrc directory [$wrksrc]\n"
|
||||
if [ -n "$build_wrksrc" ]; then
|
||||
cd $build_wrksrc || \
|
||||
msg_error "$pkgver: cannot access build_wrksrc directory [$build_wrksrc]\n"
|
||||
|
|
|
@ -32,7 +32,7 @@ if [ -f "$XBPS_CONFIGURE_DONE" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
cd $wrksrc || msg_error "$pkgver: cannot access wrksrc directory [$wrksrc].\n"
|
||||
cd "$wrksrc" || msg_error "$pkgver: cannot access wrksrc directory [$wrksrc].\n"
|
||||
if [ -n "$build_wrksrc" ]; then
|
||||
cd $build_wrksrc || \
|
||||
msg_error "$pkgver: cannot access build_wrksrc directory [$build_wrksrc].\n"
|
||||
|
|
|
@ -41,7 +41,7 @@ fi
|
|||
# If template defines do_extract() use it rather than the hooks.
|
||||
if declare -f do_extract >/dev/null; then
|
||||
[ ! -d "$wrksrc" ] && mkdir -p $wrksrc
|
||||
cd $wrksrc
|
||||
cd "$wrksrc"
|
||||
run_func do_extract
|
||||
else
|
||||
if [ -n "$build_style" ]; then
|
||||
|
@ -60,7 +60,7 @@ else
|
|||
fi
|
||||
|
||||
|
||||
[ -d $wrksrc ] && cd $wrksrc
|
||||
[ -d "$wrksrc" ] && cd "$wrksrc"
|
||||
|
||||
# If template defines post_extract(), use it.
|
||||
if declare -f post_extract >/dev/null; then
|
||||
|
|
|
@ -28,7 +28,7 @@ XBPS_INSTALL_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_install_don
|
|||
XBPS_PRE_INSTALL_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_pre_install_done"
|
||||
XBPS_POST_INSTALL_DONE="${XBPS_STATEDIR}/${sourcepkg}_${XBPS_CROSS_BUILD}_post_install_done"
|
||||
|
||||
cd $wrksrc || msg_error "$pkgver: cannot access to wrksrc [$wrksrc]\n"
|
||||
cd "$wrksrc" || msg_error "$pkgver: cannot access to wrksrc [$wrksrc]\n"
|
||||
if [ -n "$build_wrksrc" ]; then
|
||||
cd $build_wrksrc || msg_error "$pkgver: cannot access to build_wrksrc [$build_wrksrc]\n"
|
||||
fi
|
||||
|
@ -48,7 +48,7 @@ if [ ! -f $XBPS_INSTALL_DONE ]; then
|
|||
|
||||
# Run do_install()
|
||||
if [ ! -f $XBPS_INSTALL_DONE ]; then
|
||||
cd $wrksrc
|
||||
cd "$wrksrc"
|
||||
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
||||
if declare -f do_install >/dev/null; then
|
||||
run_func do_install
|
||||
|
@ -64,7 +64,7 @@ if [ ! -f $XBPS_INSTALL_DONE ]; then
|
|||
|
||||
# Run post_install()
|
||||
if [ ! -f $XBPS_POST_INSTALL_DONE ]; then
|
||||
cd $wrksrc
|
||||
cd "$wrksrc"
|
||||
[ -n "$build_wrksrc" ] && cd $build_wrksrc
|
||||
if declare -f post_install >/dev/null; then
|
||||
run_func post_install
|
||||
|
|
Loading…
Reference in a new issue