summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-10-08 16:12:59 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-10-08 16:12:59 (EDT)
commit7774653571186296cc49dbb2cb416226e5c600a1 (patch)
treec5c5fd93d1db7037f36a424fb30a9edae85d1248 /src
parentb9ee23921e1b2bf2e7edc500f371ede09c63689b (diff)
Shorten some variable names in ob-unpacksource.
Diffstat (limited to 'src')
-rw-r--r--src/ob-unpacksource.sh36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/ob-unpacksource.sh b/src/ob-unpacksource.sh
index cd2666a..7d0e1c0 100644
--- a/src/ob-unpacksource.sh
+++ b/src/ob-unpacksource.sh
@@ -25,10 +25,10 @@ ob_use locale
ob_use output
ob_use package
-upstream_archive_base=
-upstream_archive=
-upstream_archive_z=
-upstream_archive_dir=
+upstream_ar_base=
+upstream_ar=
+upstream_ar_z=
+upstream_ar_dir=
main()
{
@@ -60,9 +60,9 @@ unpack_upstream()
get_upstream_archive()
{
- upstream_archive_base="${OPK_SOURCE}-${OPK_SOURCE_VERSION_UPSTREAM}.orig.tar"
- upstream_archive="$(find '..' -name "${upstream_archive_base}*")"
- case "$(echo "${upstream_archive}" | grep -v '^$' | wc -l)" in
+ upstream_ar_base="${OPK_SOURCE}-${OPK_SOURCE_VERSION_UPSTREAM}.orig.tar"
+ upstream_ar="$(find '..' -name "${upstream_ar_base}*")"
+ case "$(echo "${upstream_ar}" | grep -v '^$' | wc -l)" in
0)
ob_error "$(ob_get_msg 'no_sources')"
;;
@@ -76,22 +76,22 @@ get_upstream_archive()
get_upstream_compression()
{
- z_ext="${upstream_archive#../${upstream_archive_base}}"
+ z_ext="${upstream_ar#../${upstream_ar_base}}"
case "${z_ext}" in
'')
- upstream_archive_z=''
+ upstream_ar_z=''
;;
'.gz')
- upstream_archive_z='z'
+ upstream_ar_z='z'
;;
'.bz2')
- upstream_archive_z='j'
+ upstream_ar_z='j'
;;
'.lz')
- upstream_archive_z='a'
+ upstream_ar_z='a'
;;
'.Z')
- upstream_archive_z='Z'
+ upstream_ar_z='Z'
;;
*)
ob_error "$(ob_get_msg 'unsupported_archive_compression')" \
@@ -102,9 +102,9 @@ get_upstream_compression()
get_upstream_dir()
{
- upstream_archive_dir="$(tar "-t${upstream_archive_z}f" \
- "${upstream_archive}" | sed -n 's@^\(\./\|\)\([^/]*\)\(/\|\)$@\2@p')"
- case "$(echo "${upstream_archive_dir}" | grep -v '^$' | wc -l)" in
+ upstream_ar_dir="$(tar "-t${upstream_ar_z}f" \
+ "${upstream_ar}" | sed -n 's@^\(\./\|\)\([^/]*\)\(/\|\)$@\2@p')"
+ case "$(echo "${upstream_ar_dir}" | grep -v '^$' | wc -l)" in
0)
ob_error "$(ob_get_msg 'no_upstream_dirs')"
;;
@@ -118,9 +118,9 @@ get_upstream_dir()
extract_upstream()
{
ob_info "$(ob_get_msg 'unpacking_upstream')"
- tar "-x${upstream_archive_z}f" "${upstream_archive}" || \
+ tar "-x${upstream_ar_z}f" "${upstream_ar}" || \
ob_error "$(ob_get_msg 'cant_unpack_upstream')"
- mv "${upstream_archive_dir}" 'src' || \
+ mv "${upstream_ar_dir}" 'src' || \
ob_error "$(ob_get_msg 'cant_move_native')"
}