summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlexey Stukalov2019-04-23 04:26:17 +0200
committerAlexey Stukalov2019-04-23 13:46:21 +0200
commite9fd65366a10f3ad9df65e3d4e0939d2be14158b (patch)
treebd6de2a4cae686581ed75536d24214cf0577cc1f /PKGBUILD
parentf77e80d4809c9762c0543ee06c359e62af5932e8 (diff)
downloadaur-e9fd65366a10f3ad9df65e3d4e0939d2be14158b.tar.gz
extract_rpm: extract common function
It's used by extract_[mpi_]_rpms. Also avoid that extract_[mpi_]_rpms do "cd" -- should avoid side-effects.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD12
1 files changed, 6 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 8bae62e8ac4c..14d3978bf4ea 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -150,20 +150,20 @@ else
_not_arch2='i486'
fi
+extract_rpm() {
+ echo -e " Extracting: ${1##*/}"
+ bsdtar -xf $1 -C $2
+}
extract_rpms() {
- cd $2
for rpm_file in ${rpm_dir}/$1 ; do
- echo -e " Extracting: ${rpm_file}"
- bsdtar -xf ${rpm_file}
+ extract_rpm ${rpm_file} $2
done
}
extract_mpi_rpms() {
- cd $2
for rpm_file in ${mpi_rpm_dir}/$1 ; do
- echo -e " Extracting: ${rpm_file}"
- bsdtar -xf ${rpm_file}
+ extract_rpm ${rpm_file} $2
done
}