Adding fixes for PKGBUILDs -- better output from hook & that arrays are whitespace delimited
This commit is contained in:
parent
017d13681e
commit
693c031124
@ -1,15 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Ensure that the following lines match the base PKGBUILD
|
# Ensure that the following lines match the base PKGBUILD
|
||||||
retcode=0
|
|
||||||
(for term in pkgname replaces pkgver epoch pkgdesc url license ../LICENSE; do
|
|
||||||
current="$(grep "${term}" ./PKGBUILD)"
|
|
||||||
reference="$(grep "${term}" /opt/aninix/Uniglot/pacman/PKGBUILD)"
|
|
||||||
diff <(printf "${reference}") <(echo "${current}")S
|
|
||||||
retcode="$(( $retcode || $? ))";
|
|
||||||
done) &>/dev/null
|
|
||||||
|
|
||||||
if [ "$(basename "$0")" == 'Uniglot' ] && [ "$retcode" != 0 ]; then
|
export retcode=0
|
||||||
|
for term in pkgname replaces pkgver epoch pkgdesc url license ../LICENSE; do
|
||||||
|
current="$(grep -E "^${term}=" ./PKGBUILD)"
|
||||||
|
reference="$(grep -E "^${term}=" /opt/aninix/Uniglot/pacman/PKGBUILD)"
|
||||||
|
diff -w --color=always <(printf "${reference}") <(echo "${current}")
|
||||||
|
export retcode="$(( $retcode || $? ))";
|
||||||
|
if [ "$retcode" != 0 ]; then
|
||||||
|
echo "$term has delta."
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$(basename "$PWD")" == 'Uniglot' ] && [ "$retcode" != 0 ]; then
|
||||||
if [ ! -f /opt/aninix/Uniglot/pacman/PKGBUILD ]; then
|
if [ ! -f /opt/aninix/Uniglot/pacman/PKGBUILD ]; then
|
||||||
# Suppress output for this package when it isn't installed yet.
|
# Suppress output for this package when it isn't installed yet.
|
||||||
echo $0
|
echo $0
|
||||||
|
2
PKGBUILD
2
PKGBUILD
@ -16,7 +16,7 @@ license=('custom')
|
|||||||
groups=()
|
groups=()
|
||||||
provides=("${pkgname}")
|
provides=("${pkgname}")
|
||||||
conflicts=()
|
conflicts=()
|
||||||
replaces=("${pkgname,,}", "aninix-${pkgname,,}")
|
replaces=("${pkgname,,}" "aninix-${pkgname,,}")
|
||||||
backup=()
|
backup=()
|
||||||
options=()
|
options=()
|
||||||
install=
|
install=
|
||||||
|
Loading…
Reference in New Issue
Block a user