From 9019894c1db1a36941c66cfd1a3a557103b7495e Mon Sep 17 00:00:00 2001 From: davidovski Date: Wed, 28 Sep 2022 12:48:11 +0100 Subject: removed a few external command calls --- src/get.sh | 2 +- src/install.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/get.sh b/src/get.sh index 08e5ee5..bbfc2c6 100755 --- a/src/get.sh +++ b/src/get.sh @@ -80,7 +80,7 @@ download_package () { return 0 fi ${VERBOSE} && printf "${LIGHT_BLACK}downloading $package from $url\n" $package $checksum - touch $output + echo > $output (curl ${CURL_OPTS} -o "$output_info" "$url.info" 2>> ${LOG_FILE} || printf "${RED}Failed to download info for %s\n" $package) (curl ${CURL_OPTS} -o "$output" "$url" 2>> ${LOG_FILE} || printf "${RED}Failed to download %s\n" $package) diff --git a/src/install.sh b/src/install.sh index c2505c5..5d3c2e7 100644 --- a/src/install.sh +++ b/src/install.sh @@ -2,7 +2,7 @@ extract () { # keep old files here, so we dont overwrite any configs - tar -h --keep-old-files -p -vvxf $1 -C ${SYSROOT} 2>${LOG_FILE} | grep -v ^d | tr -s " " | cut -d" " -f6 | cut -c2- + tar -h --keep-old-files -p -vvJxf $1 -C ${SYSROOT} 2>${LOG_FILE} | grep -v ^d | tr -s " " | cut -d" " -f6 | cut -c2- } install_package () { @@ -22,10 +22,10 @@ install_package () { [ ! -d $installed_dir ] && mkdir -p "$installed_dir" [ -f "$files" ] && { - for file in $(cat $files); do + for read -r file; do [ -z "${file%%/etc*}" ] || rm -f ${SYSROOT}$file - done + done < $files rm $files } -- cgit v1.2.1