#! /bin/sh # # This file is maintained at http://git.mdcc.cx/draai # Copyright: © 2008 Joost van Baal. This program is in the public domain. # # usage: # dr_push Pole/CD_1 Alice_In_Chains Plastikman/Artifakts_\(bc\) \ # Various/An_Anthology_of_Noise_and_Electronic_Music_Vol_4_CD_II \ # Beastie_Boys/Hello_Nasty/19\ -\ Unite.mp3 # target=$HOME/media/usb/Music source=$HOME/mp3home cd $source ## # this won't create directory a when a/b is an argument ## cp --dereference --preserve --recursive --interactive --verbose "$@" $target tar c --dereference "$@" | tar xvC $target cd - # this needs files as args # # for f # do # dir=$(dirname "$f") # test -d "$target/$dir" || mkdir -p "$target/$dir" # cp "$source/$f" "$target/$dir/" # done