mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-07 07:50:11 +01:00
Add first commitupdate script version
This commit is contained in:
parent
a87129f902
commit
5551ba3d5e
31
commitupdate
Executable file
31
commitupdate
Executable file
@ -0,0 +1,31 @@
|
||||
#!/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 -- "$file")
|
||||
|
||||
[ $newbuild -eq 0 ] && continue
|
||||
|
||||
while read l; do
|
||||
[[ "$l" == "Auto Name:"* ]] && name=${l##*:}
|
||||
done < "$file"
|
||||
|
||||
id=${file##*/}
|
||||
id=${id%.txt*}
|
||||
[ -n "$name" ] && id="$name ($id)"
|
||||
|
||||
echo "> git commit -m \"Update $id to $version ($vercode)\" -- \"$file\""
|
||||
git commit -m "Update $id to $version ($vercode)" -- "$file"
|
||||
fi
|
||||
done < <(git status --porcelain)
|
Loading…
Reference in New Issue
Block a user