Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archiso/initcpio/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'archiso/initcpio/hooks')
-rw-r--r--archiso/initcpio/hooks/archiso15
1 files changed, 14 insertions, 1 deletions
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