summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-11-03 18:33:05 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-11-03 18:33:05 +0000
commit8d25c02e51386bb0f463349e85400df9e07d94a7 (patch)
tree408b4aafe1c7bb8aebaf530cc6249e80900e1b4c
parenta66a55b656483ce7465ee6c7046e9f2b8951ba34 (diff)
prevent possible infinite loops
-rw-r--r--src/backend/functions_makepkg.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/backend/functions_makepkg.sh b/src/backend/functions_makepkg.sh
index 47b007f..1c16d45 100644
--- a/src/backend/functions_makepkg.sh
+++ b/src/backend/functions_makepkg.sh
@@ -2,16 +2,18 @@
jailpkgprep () {
while : true ; do
- if [[ ! -d "$ropath" && ! -d "$rwpath" && ! -d "$workpath" && ! -d "$overlaypath" ]] ; then
+ if [[ ! -d "$ropath" || ! -d "$rwpath" || ! -d "$workpath" || ! -d "$overlaypath" ]] ; then
+ export local i
for i in "$ropath" "$rwpath" "$workpath" "$overlaypath" ; do
mkdir "$i"
done
jailpkgmnt
break
- elif [[ -d "$ropath" && -d "$rwpath" && -d "$workpath" && -d "$overlaypath" ]] ; then
+ elif [[ -d "$ropath" || -d "$rwpath" || -d "$workpath" || -d "$overlaypath" ]] ; then
jailpkgdmnt
- for i in "$ropath" "$rwpath" "$workpath" "$overlaypath" ; do
- rm -rf "$i"
+ export local j
+ for j in "$ropath" "$rwpath" "$workpath" "$overlaypath" ; do
+ rm -rf "$j"
done
continue
fi