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
pull/61/head
Dan Puttick 2017-10-25 16:30:04 -04:00
parent 46ede0137a
commit 03b3d68733
2 changed files with 14 additions and 6 deletions

View File

@ -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

View File

@ -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