aset fsize only when file exists
This commit is contained in:
parent
2bcc19f9f6
commit
f383f8282e
@ -19,8 +19,10 @@ rm -f $OPKG_CMDS_TMP
|
|||||||
|
|
||||||
for fn in $(git diff-tree -r HEAD@{1} HEAD --name-only); do
|
for fn in $(git diff-tree -r HEAD@{1} HEAD --name-only); do
|
||||||
if grep -E -q "(DC.*json|dc.*hex|dc.*bin|tariff.*json)" <<< $fn; then
|
if grep -E -q "(DC.*json|dc.*hex|dc.*bin|tariff.*json)" <<< $fn; then
|
||||||
fsize=$(ls -l $fn | awk '{ print $5 }')
|
fsize=0
|
||||||
# add size so external programs can check
|
if [[ -f "$fn" ]]; then
|
||||||
|
fsize=$(ls -l "$fn" | awk '{ print $5 }')
|
||||||
|
fi
|
||||||
echo "$fn $fsize" >> $GIT_PULL_TMP
|
echo "$fn $fsize" >> $GIT_PULL_TMP
|
||||||
fi
|
fi
|
||||||
if grep -E -q ".*opkg_commands" <<< $fn; then
|
if grep -E -q ".*opkg_commands" <<< $fn; then
|
||||||
|
Loading…
Reference in New Issue
Block a user