Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #check if root user
- if [[ $EUID -ne 0 ]]; then
- echo "You must be a root user"
- echo "Trying to restart script as sudo"
- sudo $0
- exit
- fi
- #make folder to work in
- mkdir -p slitaz/mnt
- mkdir -p slitaz/fs
- cd slitaz
- url="http://mirror.slitaz.org/iso/4.0/slitaz-4.0.iso"
- iso="slitaz.iso"
- #download iso
- wget -c "$url" -O $iso
- mount -o loop slitaz.iso mnt
- cp mnt/boot/rootfs*.gz fs
- umount mnt
- cd fs
- for i in {1..4}
- do
- echo "Extracting rootfs$i.gz..."
- unlzma rootfs$i.gz -S .gz
- cat rootfs$i | cpio -id
- rm rootfs$i
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement