add old scripts to move around audiodata

Signed-off-by: Nico Schottelius <nico@denkbrett.schottelius.org>
This commit is contained in:
Nico Schottelius 2008-07-29 14:20:54 +02:00
parent edb22c72e5
commit f9111cb472
3 changed files with 39 additions and 0 deletions

7
audioskripte/berechtigungen.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
DIR=$(dirname $0)
chown -R :mpd "$DIR"
find "$DIR" -type d -exec chmod g=rx {} \;
find "$DIR" -type f -exec chmod g=r {} \;

17
audioskripte/hierhertaren.sh Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
#set -x
#BASEDIR=$(dirname $0)
BASEDIR=$(pwd -P)
SDIR=$1
set -e
cd "$SDIR"
for file in *; do
SUBDIR=$(echo $file | sed 's;.*/\(.*\);\1;' | sed 's/^\(.\).*/\1/' | tr 'A-Z' 'a-z')
DDIR="$BASEDIR/$SUBDIR"
echo "Creating $DDIR"
mkdir -p "$DDIR"
tar c "$file" | ( cd "$DDIR"; tar xv )
done

View file

@ -0,0 +1,15 @@
#!/bin/sh
#set -x
BASEDIR=$(dirname $0)
FILE=$1
SUBDIR=$(echo $FILE | sed 's;.*/\(.*\);\1;' | sed 's/^\(.\).*/\1/' | tr 'A-Z' 'a-z')
DDIR="$BASEDIR/$SUBDIR"
set -e
echo "Creating $DDIR"
mkdir -p "$DDIR"
echo "Moving $FILE to $DDIR"
mv "$FILE" "$DDIR"