From 26c8db5f5975db5df26a172d67570ea3f107ff73 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sun, 30 Aug 2015 00:46:50 +0100 Subject: download script: standards compliance (don't parse ls) --- download | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'download') diff --git a/download b/download index e9651b7f..2ab95d23 100755 --- a/download +++ b/download @@ -24,7 +24,17 @@ set -u -e download="resources/scripts/helpers/download" -programs="$(ls ${download}/)" + +programs=( "${download}/"* ) +# echo "${programs##*/}" ; echo "${programs%/*}" + +programlist () { + for program in "${programs[@]}"; do + printf "%s\n" "${program##*/}" + done +} +programs="$(programlist)" + noconfirm="0" help () { -- cgit v1.2.3-70-g09d2