aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--make-bootstrap-file.sh13
2 files changed, 13 insertions, 6 deletions
diff --git a/README.md b/README.md
index bbfc43b..d396f8a 100644
--- a/README.md
+++ b/README.md
@@ -18,12 +18,6 @@ If you want change the download repository
# bash make-bootstrap-file.sh -u https://mirror.fsf.org/hyperbola/gnu-plus-linux-libre/testing
```
-Change tarballs files permissions, example:
-
-```console
-$ doas chown 1000:1000 hyperbola-bootstrap-x86_64.tar.gz*
-```
-
License
=======
diff --git a/make-bootstrap-file.sh b/make-bootstrap-file.sh
index 94d987d..de42f67 100644
--- a/make-bootstrap-file.sh
+++ b/make-bootstrap-file.sh
@@ -24,6 +24,8 @@ RESULTPATH="${SCRIPT_PWD}"
ARCH="x86_64"
RELEASE="v0.4.3"
REPO_URL="https://mirror.fsf.org/hyperbola/gnu-plus-linux-libre/stable"
+TAR_OWNER_USER_ID="1000"
+TAR_OWNER_GROUP_ID="1000"
# Parse command-line arguments
while [[ $# -gt 0 ]]; do
@@ -41,6 +43,14 @@ while [[ $# -gt 0 ]]; do
REPO_URL="${2}"
shift 2
;;
+ -owu|--owner-user-id)
+ TAR_OWNER_USER_ID="${2}"
+ shift 2
+ ;;
+ -owg|--owner-group-id)
+ TAR_OWNER_GROUP_ID="${2}"
+ shift 2
+ ;;
*)
echo "Unrecognized option: $key"
usage
@@ -71,6 +81,9 @@ printf '%b%s%b%s%b\n' '\e[1;32m' '==> ' '\e[0m\033[1m' "Make hyperbola-bootstrap
# Make sha512sum
(cd ${RESULTPATH} && sha512sum "hyperbola-bootstrap-${ARCH}.tar.gz" >| "hyperbola-bootstrap-${ARCH}.tar.gz.sha512sum")
+# Fix permission Tarballs
+(cd ${RESULTPATH} && chown ${TAR_OWNER_USER_ID}:${TAR_OWNER_GROUP_ID} hyperbola-bootstrap-x86_64.tar.gz*)
+
# Clean chroot temp
case $CHROOT_DELETE in
y) rm -rf "${ROOTFS}" || true && echo -e "\e[1;32m==>\e[0m\033[1m Temporal chroot deleted! \e[m" ;;