Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-02 09:54:40 +0200
committerErich Eckner <git@eckner.net>2017-06-02 09:54:40 +0200
commitc71a2c8302f034c5f2d5919972761368671278f7 (patch)
tree79d4a07d50ac7cef7023a3950c82aabb5981efb3 /bin
parent9b5885ad20dba9a43d369af1bc0f708abb8ce8b5 (diff)
bin/common-functions: apply_package_customizations: bugfix
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common-functions16
1 files changed, 13 insertions, 3 deletions
diff --git a/bin/common-functions b/bin/common-functions
index 565ae85..a04e734 100755
--- a/bin/common-functions
+++ b/bin/common-functions
@@ -55,16 +55,26 @@ apply_package_customizations() {
exit 1
fi
+ local repo
+ local package
+
+ repo="$(pwd)"
+ package="${repo%/*/*}"
+ package="${package##*/}"
+ repo="${repo##*/}"
+ repo="${repo%-any}"
+ repo="${repo%-x86_64}"
+
if [ ! -f 'PKGBUILD.changes-applied' ]; then
# add i686 to the arch list
sed '/^arch=[^#]*any/!s|^\(arch=(\)\([^#]*)\)\s*\(#.*\)\?$|\1'"'i686'"' \2|' -i 'PKGBUILD'
- if [ -f "${repo_paths["archlinux32"]}/$2/$1/PKGBUILD" ]; then
+ if [ -f "${repo_paths["archlinux32"]}/${repo}/${package}/PKGBUILD" ]; then
# If this package has modifications (or is new), apply them now:
# append PKGBUILD
- cat "${repo_paths["archlinux32"]}/$2/$1/PKGBUILD" >> \
+ cat "${repo_paths["archlinux32"]}/${repo}/${package}/PKGBUILD" >> \
'PKGBUILD'
# copy (and overwrite) other files
- for file in "${repo_paths["archlinux32"]}/$2/$1/"*; do
+ for file in "${repo_paths["archlinux32"]}/${repo}/${package}/"*; do
if [ -f "${file}" ] && [ "${file##*/}" != 'PKGBUILD' ]; then
cp "${file}" ./
fi