diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rwxr-xr-x | hyper-bootstrap.sh | 1 | ||||
-rw-r--r-- | make-bootstrap-file.sh | 15 |
3 files changed, 10 insertions, 10 deletions
@@ -1,3 +1,5 @@ -myhyper +myhyper/ +x86_64/ +i686/ *.tar.gz *.sha512sum diff --git a/hyper-bootstrap.sh b/hyper-bootstrap.sh index 4b2e525..fd057c5 100755 --- a/hyper-bootstrap.sh +++ b/hyper-bootstrap.sh @@ -13,6 +13,7 @@ # Example: # # # ./hyper-bootstrap.sh -a x86_64 -r "https://mirror.fsf.org/hyperbola/gnu-plus-linux-libre/testing" myhyper +# # ./hyper-bootstrap.sh myhyper # # And then you can chroot to the destination directory (user: root, password: root): # diff --git a/make-bootstrap-file.sh b/make-bootstrap-file.sh index d1c5cb4..00e46bf 100644 --- a/make-bootstrap-file.sh +++ b/make-bootstrap-file.sh @@ -11,24 +11,22 @@ CHROOT_DELETE='y' RESULTPATH=${SCRIPT_PWD}/ ARCH="x86_64" REPO_URL="https://mirror.fsf.org/hyperbola/gnu-plus-linux-libre/testing" -DOWNLOAD_DIR="/tmp/bootstrap-packages" - -ROOTFS=$(mktemp -d) -mkdir -p "$ROOTFS" +ROOTFS="$ARCH" # remove old archives rm -f "${RESULTPATH}/hyperbola-bootstrap.tar.gz" "${RESULTPATH}/hyperbola-bootstrap.tar.gz.sha512sum" # bootstrap -"${SCRIPT_PWD}/hyper-bootstrap.sh" -a "${ARCH}" -r "${REPO_URL}" -d "${DOWNLOAD_DIR}" "${ROOTFS}" +"${SCRIPT_PWD}/hyper-bootstrap.sh" -a "${ARCH}" -r "${REPO_URL}" "${ROOTFS}" cd "${ROOTFS}" # clean up package cache rm -rf var/cache/* + # create new archive -tar -czf "${RESULTPATH}/hyperbola-bootstrap.tar.gz" --transform "s|^|root.${ARCH}/|" --owner 0 --group 0 -- \ - bin dev home media opt root sbin sys usr lib64 \ - boot etc lib mnt proc run srv tmp var +cd ${RESULTPATH} +tar --create --gzip --numeric-owner --xattrs --acls --file="hyperbola-bootstrap.tar.gz" "${ROOTFS}" +# create shasum sha512sum "${RESULTPATH}/hyperbola-bootstrap.tar.gz" >| "${RESULTPATH}/hyperbola-bootstrap.tar.gz.sha512sum" # clean chroot temp @@ -40,6 +38,5 @@ esac # report result echo "REPO: $REPO_URL" -echo "DOWNLOAD_DIR: $DOWNLOAD_DIR" echo "ROOTFS: $ROOTFS" echo "RESULTPATH: $RESULTPATH" |