forked from cj13579/tvmonkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tvmover.sh
executable file
·65 lines (55 loc) · 1.32 KB
/
tvmover.sh
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash -x
# SCRIPT: tvmover.sh
#
# PURPOSE: Main program script.
# Sources all the function scripts and configuration files required
# by the application.
# Read the arguments to script and act appropriately.
APP_HOME="$( cd "$( dirname "$0" )" && pwd )"
# Source the applications configs
. $APP_HOME/tvmonkey.config
# Source the applications functions
. $APP_HOME/functions/tvmonkey_main_functions.sh
. $APP_HOME/functions/tvmonkey_torrent_functions.sh
. $APP_HOME/functions/tvmonkey_xbmc_functions.sh
. $APP_HOME/functions/tvmonkey_misc_functions.sh
. $APP_HOME/functions/tvmonkey_flexget_functions.sh
# Read the arguments to the script and then do the right thing
if [ "$#" -eq "1" ] ; then
for arg in "$@"
do
case "$arg" in
--version)
show_version
exit 0
;;
-h | --help )
show_help
exit 0
;;
--info )
show_help
exit 0
;;
-c | --cron)
main_cron
;;
-i | --interactive)
echo "Interactive mode chosen...."
sleep 2
main
;;
-w | --web )
main_web
;;
--testweb )
test_web
;;
*)
echo "Usage: $0 [OPTION]. Use $0 -h, --info or --help for more information"
;;
esac
done
else
echo "Usage: $0 [OPTION]. Use $0 -h, --info or --help] for more information."
fi