index : mkinitcpio-archiso32 | |
Archlinux32 initcpio scripts used by archiso | gitolite user |
summaryrefslogtreecommitdiff |
author | David Runge <dvzrv@archlinux.org> | 2021-05-29 10:47:24 +0200 |
---|---|---|
committer | David Runge <dvzrv@archlinux.org> | 2021-05-29 10:47:24 +0200 |
commit | fa48377c8c3994b63657e03273e7f75c15bc10c9 (patch) | |
tree | 9887dbed475a63c0f204101b9afc1150ba914e91 /hooks | |
parent | 3a5877d9f913d1151e8f729a46a7ecef643252b0 (diff) | |
parent | 756c9dbeb6d693158587ae6e0116156ef5aa1af6 (diff) |
-rw-r--r-- | hooks/archiso | 15 |
diff --git a/hooks/archiso b/hooks/archiso index 1b848ce..d897ae1 100644 --- a/hooks/archiso +++ b/hooks/archiso @@ -69,10 +69,23 @@ _mnt_sfs() { # defined via initcpio's parse_cmdline() if [ "${copytoram}" = "y" ]; then msg -n ":: Copying squashfs image to RAM..." - if ! cp -- "${img}" "/run/archiso/copytoram/${img_fullname}" ; then + + # in case we have pv use it to display copy progress feedback otherwise + # fallback to using plain cp + if command -v pv > /dev/null 2>&1; then + echo "" + (pv "${img}" > "/run/archiso/copytoram/${img_fullname}") + local rc=$? + else + (cp -- "${img}" "/run/archiso/copytoram/${img_fullname}") + local rc=$? + fi + + if [ $rc != 0 ]; then echo "ERROR: while copy '${img}' to '/run/archiso/copytoram/${img_fullname}'" launch_interactive_shell fi + img="/run/archiso/copytoram/${img_fullname}" msg "done." fi |