diff options
-rwxr-xr-x | bootstrap-prepare.sh | 6 |
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 |