fix extract_image/copy tree to copy symlinks with cp -rd - .iso halves is size
authorTero Marttila <terom@fixme.fi>
Thu, 05 Jan 2012 15:05:38 +0200
changeset 11 8e5fce1229b6
parent 10 2535c16e07a3
child 12 e6a2966dec6f
fix extract_image/copy tree to copy symlinks with cp -rd - .iso halves is size
pkvlm-create
scripts/lib.sh
--- a/pkvlm-create	Thu Jan 05 14:58:57 2012 +0200
+++ b/pkvlm-create	Thu Jan 05 15:05:38 2012 +0200
@@ -314,7 +314,8 @@
 fi
 
 # Copy to customized tree
-cmd cp -r ${INSTALLER_TREE} ${INSTALL_TREE}
+[ -d ${INSTALL_TREE} ] && cmd rm -r ${INSTALL_TREE}
+cmd cp -rd ${INSTALLER_TREE} ${INSTALL_TREE}
 cmd chmod -R u=rwX,og=rX ${INSTALL_TREE}
 
 log_info "Installer extracted: $INSTALL_TREE"
--- a/scripts/lib.sh	Thu Jan 05 14:58:57 2012 +0200
+++ b/scripts/lib.sh	Thu Jan 05 15:05:38 2012 +0200
@@ -107,7 +107,7 @@
     cmd sudo mount -o loop $iso $mnt || cleanup 1
 
     # copy
-    cmd cp -r $mnt $dst || cleanup 1
+    cmd cp -rd $mnt $dst || cleanup 1
 
     # done, cleanup
     cleanup 0