summaryrefslogtreecommitdiff
path: root/src/fullpkg
diff options
context:
space:
mode:
Diffstat (limited to 'src/fullpkg')
-rwxr-xr-xsrc/fullpkg/fullpkg-build14
-rwxr-xr-xsrc/fullpkg/fullpkg-find10
2 files changed, 12 insertions, 12 deletions
diff --git a/src/fullpkg/fullpkg-build b/src/fullpkg/fullpkg-build
index 8149453..e824c2e 100755
--- a/src/fullpkg/fullpkg-build
+++ b/src/fullpkg/fullpkg-build
@@ -45,13 +45,13 @@ remove_buildorder() {
succesfull_build() {
- if [ "$RUN" != "$FULLBUILDCMD" ]; then
+ if [[ "$RUN" != "$FULLBUILDCMD" ]]; then
return 0 # Custom command or download sources
fi
- if source .INFO && [ -n "$repo" ]; then
+ if source .INFO && [[ -n "$repo" ]]; then
- if [ ! -z "$HOOKLOCALRELEASE" ]; then
+ if [[ ! -z "$HOOKLOCALRELEASE" ]]; then
"$HOOKLOCALRELEASE" "$repo"
fi
@@ -75,11 +75,11 @@ __build() {
build_packages=($(sort -gr $buildorder | cut -d: -f2)) # greater levels must be built first
- while [ ${#build_packages[@]} -ge 1 ]; do
+ while [[ ${#build_packages[@]} -ge 1 ]]; do
pushd "$build_dir/${build_packages[0]}" >/dev/null
- if [ -n "${HOOKPKGBUILDMOD}" ]; then
+ if [[ -n "${HOOKPKGBUILDMOD}" ]]; then
${HOOKPKGBUILDMOD} || true
fi
@@ -156,7 +156,7 @@ shift $(( OPTIND - 1 ))
build_dir="${1:-`pwd`}"
buildorder="${build_dir}/BUILDORDER"
-if [ ! -e "$buildorder" ]; then
+if [[ ! -e "$buildorder" ]]; then
error "This is not a build_dir. Make one using fullpkg."
usage
exit 1
@@ -172,7 +172,7 @@ fi
msg "$MESSAGE"
__build
-if [ "$RUN" != "$FULLBUILDCMD" ]; then
+if [[ "$RUN" != "$FULLBUILDCMD" ]]; then
# Used for downloading or custom command
mv "$build_dir/.BUILDORDER" "$buildorder"
exit 0
diff --git a/src/fullpkg/fullpkg-find b/src/fullpkg/fullpkg-find
index 566605a..57819c3 100755
--- a/src/fullpkg/fullpkg-find
+++ b/src/fullpkg/fullpkg-find
@@ -104,7 +104,7 @@ find_deps() {
# greater levels are built first
echo "${LEVEL}:${pkgbase}" >>"$build_dir/BUILDORDER"
# PKGBUILD is already there
- if [ -d "${build_dir}/${pkgbase}" ]; then
+ if [[ -d "${build_dir}/${pkgbase}" ]]; then
exit 0
# Copy dir to build_dir
else
@@ -133,7 +133,7 @@ find_deps() {
# arch=any packages.
local pkgdir=$(toru -p ${_dep}) || true
- if [ -n "$pkgdir" -a -d "${pkgdir}" ]; then
+ if [[ -n "$pkgdir" ]] && [[ -d "${pkgdir}" ]; then
found=true
pushd "${pkgdir}" > /dev/null
@@ -193,7 +193,7 @@ while getopts 'hA:l:cmn' arg; do
esac
done
-if [ ! -r PKGBUILD ]; then
+if [[ ! -r PKGBUILD ]]; then
error "This directory doesnt contain a PKGBUILD"
usage
exit 1
@@ -202,11 +202,11 @@ fi
shift $(( OPTIND - 1 ))
build_dir="${1}"
-if [ "$LEVEL" -eq 0 ]; then
+if [[ "$LEVEL" -eq 0 ]]; then
build_dir="${1:-$(mktemp -d /tmp/fullpkg.XXXXXX)}"
- if [ ! -d "$build_dir" ]; then
+ if [[ ! -d "$build_dir" ]]; then
mkdir -p "$build_dir"
elif "$CLEANFIRST"; then
# Erase files already in dir