File: dr_push

package info (click to toggle)
draai 20110603-1
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 500 kB
  • sloc: sh: 751; perl: 221; makefile: 34
file content (33 lines) | stat: -rwxr-xr-x 757 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#! /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