From a4a7af33aece68914cac5113c4b27285a8b91304 Mon Sep 17 00:00:00 2001 From: Pat Riehecky Date: Jun 10 2014 14:13:10 +0000 Subject: Fixed inconsistent use of ${} notation --- diff --git a/get_sources.sh b/get_sources.sh index fad8828..9df5a3b 100755 --- a/get_sources.sh +++ b/get_sources.sh @@ -13,17 +13,17 @@ surl="https://git.centos.org/sources/" pn=$(basename `pwd`) f=.${pn}.metadata -if [ ! -e $f ] || [ ! -d .git ] || [ ! -d SOURCES ]; then +if [ ! -e ${f} ] || [ ! -d .git ] || [ ! -d SOURCES ]; then echo 'You need to run this from inside a sources git repo' exit 1 fi br=$(cat .git/HEAD |awk -F'/' '{print $3}' ) while read a ; do - fsha=$( echo $a | cut -f1 -d\ ) - fname=$( echo $a | cut -f2 -d\ ) - if [ $fsha = "da39a3ee5e6b4b0d3255bfef95601890afd80709" ]; then + fsha=$( echo ${a} | cut -f1 -d\ ) + fname=$( echo ${a} | cut -f2 -d\ ) + if [ ${fsha} = "da39a3ee5e6b4b0d3255bfef95601890afd80709" ]; then # zero byte file - touch $fname + touch ${fname} else if [ ! -e ${fname} ]; then curl ${surl}/${pn}/${br}/${fsha} -o ${fname} @@ -31,4 +31,4 @@ while read a ; do echo "${fname} exists. skipping" fi fi -done < $f +done < ${f}