diff options
author | Martino Pilia | 2018-02-25 13:53:34 +0100 |
---|---|---|
committer | Martino Pilia | 2018-02-25 13:53:34 +0100 |
commit | 14314f4d806aceb3bbb6caf6e5aa02adb8868ee0 (patch) | |
tree | d35324da4e0476ee9526af8517c277e497e366cf /PKGBUILD | |
parent | 019220a3c64aa8c9e4c6b9834a3a2a8faacee889 (diff) | |
download | aur-14314f4d806aceb3bbb6caf6e5aa02adb8868ee0.tar.gz |
Fix small errors in the build
Fix references to srcdir: global replacement in sed, ignore binaries.
Prefix local bash variables with an underscore.
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,7 +1,7 @@ # Maintainer of this PKBGUILD file: Martino Pilia <martino.pilia@gmail.com> pkgname=salome-meca-bin pkgver=2017.0.2 -pkgrel=2 +pkgrel=3 pkgdesc='Integration of the Code_Aster solver in the Salome platform' arch=('x86_64') url='https://www.code-aster.org/spip.php?article303' @@ -53,17 +53,17 @@ build() { echo "Fixing references..." # fix references to srcdir - for f in `grep -R "${srcdir}" ${srcdir} | cut -d: -f1`; do - sed -i "s,${srcdir},/opt," $f + for f in `grep -RI "${srcdir}" ${srcdir} | cut -d: -f1`; do + sed -i "s,${srcdir},/opt,g" $f done echo "Fixing symlinks..." # fix symlinks pointing to srcdir # https://stackoverflow.com/questions/31020219/how-change-symlink-path-for-many-files - oldpath="${srcdir}" - newpath='/opt' - find ${srcdir}/salome_meca -type l -execdir bash -c 'p="$(readlink "{}")"; if [ "${p:0:1}" != "/" ]; then p="$(echo "$(pwd)/$p" | sed -e "s|/\./|/|g" -e ":a" -e "s|/[^/]*/\.\./|/|" -e "t a")"; fi; if [ "${p:0:'${#oldpath}'}" == "'"$oldpath"'" ]; then ln -snf "'"$newpath"'${p:'${#oldpath}'}" "{}"; fi;' \; + _oldpath="${srcdir}" + _newpath='/opt' + find ${srcdir}/salome_meca -type l -execdir bash -c 'p="$(readlink "{}")"; if [ "${p:0:1}" != "/" ]; then p="$(echo "$(pwd)/$p" | sed -e "s|/\./|/|g" -e ":a" -e "s|/[^/]*/\.\./|/|" -e "t a")"; fi; if [ "${p:0:'${#_oldpath}'}" == "'"$_oldpath"'" ]; then ln -snf "'"$_newpath"'${p:'${#_oldpath}'}" "{}"; fi;' \; } package() { |