forked from pool/gimp-help
40 lines
1.6 KiB
Bash
40 lines
1.6 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
# Update needed Update PDB according to package status:
|
||
|
|
||
|
# If you want to sync packages in PDB with the latest tarball, comment out this "exit 0":
|
||
|
#
|
||
|
# You should be sure that you backported all proofreads and PDB changes
|
||
|
# to gimp-help-update-spec.sh and tat you already called
|
||
|
# gimp-help-update-spec.sh!
|
||
|
#
|
||
|
exit 0
|
||
|
|
||
|
if test -f gimp-help-AUTHORS ; then
|
||
|
AUTHORS="$(<gimp-help-AUTHORS)"
|
||
|
fi
|
||
|
exec <gimp-help.spec
|
||
|
while read PACKAGE_STR PKG ; do
|
||
|
if test "$PACKAGE_STR" != "%package" ; then
|
||
|
continue
|
||
|
fi
|
||
|
read SUMMARY_STR SUMMARY
|
||
|
read GROUP_STR GROUP
|
||
|
# TRICK: pdb-commandline cannot handle '@' in the package name. Use wildcard '?' instead:
|
||
|
TPKG=${PKG/@/?}
|
||
|
if test -z "$(pdb query --filter gimp-help-$TPKG --release stable)" ; then
|
||
|
pdb request --action branch --filter gimp-help --release stable --newname gimp-help-$PKG --comment "Split package for new locale."
|
||
|
fi
|
||
|
if test "$(pdb query --filter "gimp-help-$TPKG" --release stable --attribs label.english --format "%s" )" != "$SUMMARY" ; then
|
||
|
pdb change --filter "gimp-help-$TPKG" --release stable --attrib "label.english" --new "$SUMMARY"
|
||
|
fi
|
||
|
if test -f gimp-help-AUTHORS ; then
|
||
|
if test "$(pdb query --filter "gimp-help-$TPKG" --release stable --attribs authornameemail --format "%s" )" != "$AUTHORS" ; then
|
||
|
pdb change --filter "gimp-help-$TPKG" --release stable --attrib "authornameemail" --new "$AUTHORS"
|
||
|
fi
|
||
|
fi
|
||
|
if test "$(pdb query --filter "gimp-help-$TPKG" --release stable --attribs group --format "%s" )" != "$GROUP" ; then
|
||
|
pdb change --filter "gimp-help-$TPKG" --release stable --attrib "group" --new "$GROUP"
|
||
|
fi
|
||
|
done
|