mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 14:30:11 +01:00
34 lines
906 B
Bash
Executable File
34 lines
906 B
Bash
Executable File
#!/bin/bash
|
|
|
|
while read line; do
|
|
if [[ "$line" == *M*metadata/*.txt ]]; then
|
|
file=${line##* }
|
|
|
|
newbuild=0
|
|
while read l; do
|
|
if [[ "$l" == "+Build Version:"* ]]; then
|
|
newbuild=1
|
|
build=${l#*:}
|
|
version=${build%%,*}
|
|
build=${build#*,}
|
|
vercode=${build%%,*}
|
|
fi
|
|
done < <(git diff HEAD -- "$file")
|
|
|
|
[ $newbuild -eq 0 ] && continue
|
|
|
|
while read l; do
|
|
[[ "$l" == "Auto Name:"* ]] && name=${l##*:}
|
|
done < "$file"
|
|
|
|
id=${file##*/}
|
|
id=${id%.txt*}
|
|
[ -d metadata/$id ] && extra=metadata/$id
|
|
[ -n "$name" ] && id="$name ($id)"
|
|
fi
|
|
done < <(git status --porcelain)
|
|
|
|
echo "> git commit -m \"Update $id to $version ($vercode)\" -e -- $file $extra"
|
|
git commit -m "Update $id to $version ($vercode)" -e -- $file $extra
|
|
|