summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-05-26 00:48:49 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-05-26 00:48:49 (EDT)
commitfc0bf7c4965d24846ea26cdd82de3148a90cb221 (patch)
tree37f4f092840725b6caae147053c45a1c32a50d74
parent72562b1c6304f8513f09baa5674bbb83d1edb6c6 (diff)
bootstrap-prepare.sh: Skip already gotten pkgs.
-rwxr-xr-xbootstrap-prepare.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/bootstrap-prepare.sh b/bootstrap-prepare.sh
index 46d108c..1b1c782 100755
--- a/bootstrap-prepare.sh
+++ b/bootstrap-prepare.sh
@@ -188,6 +188,10 @@ get_pkg()
local sha256sum="${3}"
local pkg_ver
+ pkg_ver="${filename##*/src-}"
+ pkg_ver="${pkg_ver%_src_all.opk}"
+ [ -d "pkg/${pkg_ver%_*}" ] && return
+
[ -d pkg ] || mkdir pkg
cd pkg
@@ -201,8 +205,6 @@ get_pkg()
exit 1
fi
- pkg_ver="${filename#src-}"
- pkg_ver="${pkg_ver%_src_all.opk}"
tar -xzOf "${filename}" data.tar.gz | tar -xz
mv "usr/src/${pkg_ver}" "${pkg_ver%_*}"
rmdir usr/src usr