add old scripts to move around audiodata
Signed-off-by: Nico Schottelius <nico@denkbrett.schottelius.org>
This commit is contained in:
parent
edb22c72e5
commit
f9111cb472
3 changed files with 39 additions and 0 deletions
7
audioskripte/berechtigungen.sh
Executable file
7
audioskripte/berechtigungen.sh
Executable 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
17
audioskripte/hierhertaren.sh
Executable 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
|
15
audioskripte/hierherverschieben.sh
Executable file
15
audioskripte/hierherverschieben.sh
Executable 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"
|
Loading…
Reference in a new issue