Skip to content

Commit

Permalink
refactor: update Arch Linux bootstrap URL and switch to zstd compression
Browse files Browse the repository at this point in the history
  • Loading branch information
ruizlenato committed Jul 1, 2024
1 parent d8ec1c3 commit 4b4e589
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions make-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ start() {

download() {
echo -e '\e[1;33mDownloading Arch Linux rootfs\e[m'
wget https://mirrors.edge.kernel.org/archlinux/iso/latest/archlinux-bootstrap-x86_64.tar.gz -q
wget https://mirror.rackspace.com/archlinux/iso/latest/archlinux-bootstrap-x86_64.tar.zst -q
printf "\033[A\033[K"
echo -e '\e[1;32m✓\e[m Arch Linux rootfs downloaded!'
extract
}

extract() {
echo -e '\e[1;33mExtracting Arch Linux rootfs\e[m'
sudo tar --xattrs --xattrs-include="security.capability" -zxpf archlinux-bootstrap-x86_64.tar.gz &>/dev/null
sudo tar --xattrs --xattrs-include="security.capability" -I zstd -xpf archlinux-bootstrap-x86_64.tar.zst &>/dev/null
printf "\033[A\033[K"
echo -e '\e[1;32m✓\e[m Extract Arch Linux rootfs!'
configure
Expand Down Expand Up @@ -54,11 +54,10 @@ compress() {
sudo chown root:root ArchWSLBootstrap-$(date -u +%Y-%m-%d).tar.gz
printf "\033[A\033[K"
echo -e '\e[1;32m✓\e[m Building bootstrap!'
cleanup
}

cleanup() {
sudo rm -rf archlinux-bootstrap-x86_64.tar.gz root.x86_64/
sudo rm -rf archlinux-bootstrap-x86_64.tar.zst root.x86_64/
clear
echo -e '\e[1;32mAll done.\e[m'
}
Expand Down

0 comments on commit 4b4e589

Please sign in to comment.