Skip to content

Commit 03b3d68

Browse files
committed
Update shell_utils
* Add copy_metadata for copying files and including their metadata - sometimes useful for copying individual files into a mounted image without using rsync. * Remove out of date install lines from prepare_rPI.sh
1 parent 46ede01 commit 03b3d68

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

shell_utils/copy_metadata.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
# Filename: cp-metadata
3+
4+
myecho=echo
5+
src_path="$1"
6+
dst_path="$2"
7+
8+
find "$src_path" |
9+
while read src_file; do
10+
dst_file="$dst_path${src_file#$src_path}"
11+
$myecho chmod --reference="$src_file" "$dst_file"
12+
$myecho chown --reference="$src_file" "$dst_file"
13+
$myecho touch --reference="$src_file" "$dst_file"
14+
done

shell_utils/prepare_rPI.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,9 @@
33
# change locales to en_US.UTF-8
44
dpkg-reconfigure locales
55

6-
sed -i "s/wheezy/jessie/" /etc/apt/sources.list
76
apt-get update
87
apt-get dist-upgrade
98
apt-get autoremove
10-
apt-get install libreoffice p7zip-full libfontforge1 timidity freepats pmount
11-
dpkg -i pdf2htmlex*.deb
12-
13-
# Disable swap
14-
dphys-swapfile uninstall
159

1610
# enable rc.local
1711
systemctl enable rc-local.service

0 commit comments

Comments
 (0)