home · contact · privacy
Copy over repo rather than just specific files.
authorChristian Heller <c.heller@plomlompom.de>
Sun, 6 Sep 2026 18:00:20 +0000 (18:00 +0000)
committerChristian Heller <c.heller@plomlompom.de>
Sun, 6 Sep 2026 18:00:20 +0000 (18:00 +0000)
setup_luksvg.sh

index 2b93587c1cef541fce70c12779503b9e605ad5a0..fcaeabf999ab5da9a5a290dbed044df7817be776 100755 (executable)
@@ -5,13 +5,9 @@
 usage $# "partition"
 PARTITION=$1
 
-# constants we might want to change at some point
-TO_COPY="90-backlight.rules backlight.py start_root.sh start_home.sh _lib.sh"
-
 # constants derived from changeables
 PATH_LUKS_MAPPER=$(path_luks_mapper "${NAME_LUKSVG}")
 PATH_MNT_DATA="${PATH_MNT}/${NAME_DATA}"
-PATH_MNT_DATA_CONFIG="${PATH_MNT_DATA}/config"
 PATH_VG=$(path_vg "${NAME_LUKSVG}")
 PATH_VG_DATA=${PATH_VG}/${NAME_DATA}
 PATH_VG_SWAP=${PATH_VG}/${NAME_SWAP}
@@ -44,16 +40,13 @@ create_lv "${NAME_LUKSVG}" "${NAME_DATA}" 256G
 msg 'Creating EXT4 filesystem …'
 mkfs.ext4 -q "${PATH_VG_DATA}"
 
-# place config setup scripts
+# place repo copy
 mount_privately "${PATH_VG_DATA}" "${PATH_MNT_DATA}"
-mkdir "${PATH_MNT_DATA_CONFIG}"
-msg 'Copying setup files …'
-for FNAME in ${TO_COPY}; do
-    cp "${FNAME}" "${PATH_MNT_DATA_CONFIG}/"
-done
-msg 'Unmounting …'
-umount "${PATH_MNT_DATA}"
+msg 'Copying repo …'
+cp -a "$(pwd)" "${PATH_MNT_DATA}"
 
 # clean-up
+msg 'Unmounting …'
+umount "${PATH_MNT_DATA}"
 close_luksvg
 msg 'Finished!'