mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 15:02:51 +03:00
Add tools dir. New tool: categorycount
This commit is contained in:
parent
eb7d2dceab
commit
42285e560a
2 changed files with 32 additions and 0 deletions
40
tools/commitupdates
Executable file
40
tools/commitupdates
Executable file
|
@ -0,0 +1,40 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Commits updates to apps, allowing you to edit the commit messages
|
||||
|
||||
commands=()
|
||||
|
||||
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)"
|
||||
|
||||
commands+=("git commit -m 'Update $id to $version ($vercode)' -e -- $file $extra")
|
||||
fi
|
||||
done < <(git status --porcelain)
|
||||
|
||||
for cmd in "${commands[@]}"; do
|
||||
eval "$cmd"
|
||||
done
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue