mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-06 19:10:12 +02:00
Save all commit updates in an array, loop over them later
This commit is contained in:
parent
4ffd3aefa5
commit
c52203f87d
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
commands=()
|
||||||
|
|
||||||
while read line; do
|
while read line; do
|
||||||
if [[ "$line" == *M*metadata/*.txt ]]; then
|
if [[ "$line" == *M*metadata/*.txt ]]; then
|
||||||
file=${line##* }
|
file=${line##* }
|
||||||
@ -25,9 +27,12 @@ while read line; do
|
|||||||
id=${id%.txt*}
|
id=${id%.txt*}
|
||||||
[ -d metadata/$id ] && extra=metadata/$id
|
[ -d metadata/$id ] && extra=metadata/$id
|
||||||
[ -n "$name" ] && id="$name ($id)"
|
[ -n "$name" ] && id="$name ($id)"
|
||||||
|
|
||||||
|
commands+=("git commit -m 'Update $id to $version ($vercode)' -e -- $file $extra")
|
||||||
fi
|
fi
|
||||||
done < <(git status --porcelain)
|
done < <(git status --porcelain)
|
||||||
|
|
||||||
echo "> git commit -m \"Update $id to $version ($vercode)\" -e -- $file $extra"
|
for cmd in "${commands[@]}"; do
|
||||||
git commit -m "Update $id to $version ($vercode)" -e -- $file $extra
|
eval "$cmd"
|
||||||
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user