29 lines
531 B
Bash
Executable File
29 lines
531 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# 1: root path
|
|
# 2: torrent name
|
|
# 3: category
|
|
|
|
echo "1: $1" >> /base/actions.txt
|
|
echo "2: $2" >> /base/actions.txt
|
|
echo "3: $3" >> /base/actions.txt
|
|
|
|
if [ $3 == 'Anime' ]
|
|
then
|
|
cp -lR "$1" "/base/import/$2"
|
|
echo "cp -lR '$1' '/base/import/$2'" >> /base/actions.txt
|
|
fi
|
|
|
|
if [ $3 == 'Music' ]
|
|
then
|
|
mv -R "$1" "/Music/$2"
|
|
echo "mv -R '$1' '/Music/$2'" >> /base/actions.txt
|
|
fi
|
|
|
|
if [ $3 == 'Movies' ]
|
|
then
|
|
mv -R "$1" "/Movies/$2"
|
|
echo "mv -R '$1' '/Movies/$2'" >> /base/actions.txt
|
|
fi
|
|
|
|
echo "" >> /base/actions.txt |