File: imdb-rename.sh

package info (click to toggle)
imdb-tools 0.9-1
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 160 kB
  • ctags: 12
  • sloc: sh: 568; makefile: 89
file content (32 lines) | stat: -rw-r--r-- 668 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
#!/bin/bash --

#  IMDB Tools 
#  Copyright (c) 2006 Matthew Johnson
#
#  This program is free software; you can redistribute it and/or modify it
#  under the terms of the GNU General Public License Version 2.
#
#  Full licence text is included in the COPYING file with this program.

#
# Renames files based on IMDB titles from the cache

PREFIX=%PREFIX%
VERSION=%VERSION%
PATH=/bin:/usr/bin:$PREFIX/bin

if [[ "$1" == "" || "$1" == "--help" ]]; then
   echo "Syntax: imdb-rename <files>"
   exit 1
fi

if [[ "$1" == "--version" ]]; then
   echo "IMDB Tools Version $VERSION"
   exit 1
fi

while [[ "$1" != "" ]];
do
   imdb-get -f "`realpath "$1"`" -n
   shift
done