mirror of
https://git.centos.org/centos-git-common.git
synced 2025-02-23 16:22:56 +00:00
Fixed inconsistent use of ${} notation
This commit is contained in:
parent
c19d26d752
commit
a4a7af33ae
1 changed files with 6 additions and 6 deletions
|
@ -13,17 +13,17 @@ surl="https://git.centos.org/sources/"
|
||||||
|
|
||||||
pn=$(basename `pwd`)
|
pn=$(basename `pwd`)
|
||||||
f=.${pn}.metadata
|
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'
|
echo 'You need to run this from inside a sources git repo'
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
br=$(cat .git/HEAD |awk -F'/' '{print $3}' )
|
br=$(cat .git/HEAD |awk -F'/' '{print $3}' )
|
||||||
while read a ; do
|
while read a ; do
|
||||||
fsha=$( echo $a | cut -f1 -d\ )
|
fsha=$( echo ${a} | cut -f1 -d\ )
|
||||||
fname=$( echo $a | cut -f2 -d\ )
|
fname=$( echo ${a} | cut -f2 -d\ )
|
||||||
if [ $fsha = "da39a3ee5e6b4b0d3255bfef95601890afd80709" ]; then
|
if [ ${fsha} = "da39a3ee5e6b4b0d3255bfef95601890afd80709" ]; then
|
||||||
# zero byte file
|
# zero byte file
|
||||||
touch $fname
|
touch ${fname}
|
||||||
else
|
else
|
||||||
if [ ! -e ${fname} ]; then
|
if [ ! -e ${fname} ]; then
|
||||||
curl ${surl}/${pn}/${br}/${fsha} -o ${fname}
|
curl ${surl}/${pn}/${br}/${fsha} -o ${fname}
|
||||||
|
@ -31,4 +31,4 @@ while read a ; do
|
||||||
echo "${fname} exists. skipping"
|
echo "${fname} exists. skipping"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < $f
|
done < ${f}
|
||||||
|
|
Loading…
Add table
Reference in a new issue