summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-08-15 15:54:20 -0400
committerJoey Hess <joey@kitenet.net>2011-08-15 15:54:20 -0400
commit148f8aa0018ee5b6961103983ab14362f67ee847 (patch)
treed2bcfd969fbae0dde9fe2bf4b65de5f8de4214ee
parentcdee8b86523d0c381c9615761c0d54730a4a6448 (diff)
downloaddebootstrap-148f8aa0018ee5b6961103983ab14362f67ee847.tar.gz
put in_path at top so later functions can use it
(too much haskell coding strikes again I suppose)
-rw-r--r--functions24
1 files changed, 12 insertions, 12 deletions
diff --git a/functions b/functions
index 4399707..74f0e0b 100644
--- a/functions
+++ b/functions
@@ -5,6 +5,18 @@ smallyes() {
while echo "$YES" 2>/dev/null ; do : ; done
}
+in_path () {
+ IFS=":" _in_path "$1"
+}
+_in_path () {
+ for dir in $PATH; do
+ if [ -x "$dir/$1" ]; then
+ return 0
+ fi
+ done
+ return 1
+}
+
############################################################### interaction
error () {
@@ -1292,18 +1304,6 @@ on_exit () {
N_EXIT_THINGS="$(( $N_EXIT_THINGS + 1 ))"
}
-in_path () {
- IFS=":" _in_path "$1"
-}
-_in_path () {
- for dir in $PATH; do
- if [ -x "$dir/$1" ]; then
- return 0
- fi
- done
- return 1
-}
-
############################################################## fakechroot tools
install_fakechroot_tools () {