diff options
Diffstat (limited to 'remote/setup-tools.sh')
| -rw-r--r-- | remote/setup-tools.sh | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/remote/setup-tools.sh b/remote/setup-tools.sh index 15ef335d..9cc35362 100644 --- a/remote/setup-tools.sh +++ b/remote/setup-tools.sh @@ -52,23 +52,27 @@ setup_git () fi } -copyfileswithdependencies () { +copyfileswithdependencies () +{ cd $VERSION/tmp COPYFILES_LIST="copyfiles.list" - for FILENAME in $REQUIRED_BINARIES - do - for f in $(find . -name $FILENAME -type f -executable); do [ $(file $f |grep -i Executable |grep -c ELF) -eq 1 ] && FILE=$f ; done - echo $FILE >> $COPYFILES_LIST - #fetch dependencies - for i in $(ldd $FILE |awk -F ">" '{print $2}'|awk '{print $1}'|grep ^/) - do - filename_base=$(basename $i | awk -F "." '{print $1}') - filename_path=$(dirname $i) - echo "$filename_path/$filename_base*" >> $COPYFILES_LIST - done - #copy to initramfsdir - tar -cpv $(cat $COPYFILES_LIST) | tar -xpv -C $INSTALL_DIR + for FILENAME in $REQUIRED_BINARIES + do + for f in $(find . -name $FILENAME -type f -executable) + do + [ $(file $f |grep -i Executable |grep -c ELF) -eq 1 ] && FILE=$f + done + echo $FILE >> $COPYFILES_LIST + #fetch dependencies + for i in $(ldd $FILE |awk -F ">" '{print $2}'|awk '{print $1}'|grep ^/) + do + filename_base=$(basename $i | awk -F "." '{print $1}') + filename_path=$(dirname $i) + echo "$filename_path/$filename_base*" >> $COPYFILES_LIST + done + #copy to initramfsdir + tar -cpv $(cat $COPYFILES_LIST) | tar -xpv -C $INSTALL_DIR done } @@ -78,12 +82,18 @@ main () { while (( "$#" )); do TOOL=$1 - read_config - read_build - install_dependencies - fetch_source - build - copyfileswithdependencies + if [ -d $TOOL ]; + then + cd $TOOL + read_config + read_build + install_dependencies + fetch_source + build + copyfileswithdependencies + else + echo "Tool directory not found." + fi shift done |
