aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-05 17:20:06 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-05 17:20:06 +0000
commit823711f892deff3fb19fecf82b59a7be6739ac5d (patch)
treedb10ff452cdaecbe3fc7f25564924c616e7ad6dd
parente1aba5b620a5320f5fc676633f3c3bb998a59f3e (diff)
downloadpaludis-823711f892deff3fb19fecf82b59a7be6739ac5d.tar.gz
paludis-823711f892deff3fb19fecf82b59a7be6739ac5d.tar.xz
Move unpack into an external script so that it can be used by non-ebuilds.
-rw-r--r--ebuild/Makefile.am1
-rwxr-xr-xebuild/ebuild.bash1
-rw-r--r--ebuild/utils/Makefile.am1
-rwxr-xr-x[-rw-r--r--]ebuild/utils/unpack (renamed from ebuild/unpack_functions.bash)22
4 files changed, 11 insertions, 14 deletions
diff --git a/ebuild/Makefile.am b/ebuild/Makefile.am
index e94c874..746f90f 100644
--- a/ebuild/Makefile.am
+++ b/ebuild/Makefile.am
@@ -34,7 +34,6 @@ libexecprog_SCRIPTS = \
src_install.bash \
src_test.bash \
src_unpack.bash \
- unpack_functions.bash \
usage_error.bash
TESTS_ENVIRONMENT = env \
diff --git a/ebuild/ebuild.bash b/ebuild/ebuild.bash
index 76d5ca5..2a5e1ad 100755
--- a/ebuild/ebuild.bash
+++ b/ebuild/ebuild.bash
@@ -77,7 +77,6 @@ ebuild_load_module list_functions
ebuild_load_module multilib_functions
ebuild_load_module install_functions
ebuild_load_module build_functions
-ebuild_load_module unpack_functions
ebuild_load_module eclass_functions
ebuild_source_profile()
diff --git a/ebuild/utils/Makefile.am b/ebuild/utils/Makefile.am
index 8a1f295..ae19141 100644
--- a/ebuild/utils/Makefile.am
+++ b/ebuild/utils/Makefile.am
@@ -44,6 +44,7 @@ libexecprog_SCRIPTS = \
newlib.so \
newman \
newsbin \
+ unpack \
$(libexecprog_SCRIPTS_extra)
libexecprog_PROGRAMS = merge unmerge
diff --git a/ebuild/unpack_functions.bash b/ebuild/utils/unpack
index 8cd3f9f..172eee0 100644..100755
--- a/ebuild/unpack_functions.bash
+++ b/ebuild/utils/unpack
@@ -21,18 +21,6 @@
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA
-unpack()
-{
- [[ -z "$@" ]] && die "No arguments given to unpack"
-
- for x in "$@" ; do
- x=$(echo $x )
- echo ">>> Unpacking ${x} to ${PWD}"
- [[ "${x:0:2}" == "./" ]] || x="${DISTDIR}/${x}"
- unpack_one "${x}"
- done
-}
-
unpack_one()
{
[[ -z "$1" ]] && die "Bad argument for unpack_one"
@@ -91,3 +79,13 @@ unpack_one()
}
+[[ -z "$@" ]] && die "No arguments given to unpack"
+
+for x in "$@" ; do
+ x=$(echo $x )
+ echo ">>> Unpacking ${x} to ${PWD}"
+ [[ "${x:0:2}" == "./" ]] || x="${DISTDIR}/${x}"
+ unpack_one "${x}"
+done
+
+