Skip to content

Commit

Permalink
Update shell_utils
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
dputtick committed Oct 25, 2017
1 parent 46ede01 commit 03b3d68
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
14 changes: 14 additions & 0 deletions shell_utils/copy_metadata.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash
# Filename: cp-metadata

myecho=echo
src_path="$1"
dst_path="$2"

find "$src_path" |
while read src_file; do
dst_file="$dst_path${src_file#$src_path}"
$myecho chmod --reference="$src_file" "$dst_file"
$myecho chown --reference="$src_file" "$dst_file"
$myecho touch --reference="$src_file" "$dst_file"
done
6 changes: 0 additions & 6 deletions shell_utils/prepare_rPI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@
# change locales to en_US.UTF-8
dpkg-reconfigure locales

sed -i "s/wheezy/jessie/" /etc/apt/sources.list
apt-get update
apt-get dist-upgrade
apt-get autoremove
apt-get install libreoffice p7zip-full libfontforge1 timidity freepats pmount
dpkg -i pdf2htmlex*.deb

# Disable swap
dphys-swapfile uninstall

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

0 comments on commit 03b3d68

Please sign in to comment.