From 148f8aa0018ee5b6961103983ab14362f67ee847 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 15 Aug 2011 15:54:20 -0400 Subject: put in_path at top so later functions can use it (too much haskell coding strikes again I suppose) --- functions | 24 ++++++++++++------------ 1 file 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 () { -- cgit v1.2.3