index : archiso32 | |
Archlinux32 iso tools | 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 | e3a7f02385f23b6111ca7601b49e5ef43c02b3ba (patch) | |
tree | 409c97a50854cb92267c8176c0a8fcb2deba0b68 /archiso/initcpio/hooks | |
parent | 28ab118099b19f76ff1937776400a2bb7f8b09bb (diff) | |
parent | 31427eca7a3a6eea80fa2e3910e5805bee14c0c4 (diff) |
-rw-r--r-- | archiso/initcpio/hooks/archiso | 15 |
diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 1b848ce..d897ae1 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/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 |