remove svn:externals-using games subdirectory
[divverent/netradiant.git] / download-gamepacks.sh
1 #!/bin/sh
2
3 pack()
4 {
5         pack=$1; shift
6         license=$1; shift
7         sourcetype=$1; shift
8         source=$1; shift
9
10         if [ -d "games/$pack" ]; then
11                 echo "Updating $pack..."
12                 case "$sourcetype" in
13                         svn)
14                                 svn update "games/$pack" "$@"
15                                 ;;
16                 esac
17                 return
18         fi
19
20         echo
21         echo "Available pack: $pack"
22         echo "  License: $license"
23         echo "  Download via $sourcetype from $source"
24         echo
25         case " $PACKFILTER " in
26                 "  ")
27                         ;;
28                 *" $pack "*)
29                         ;;
30                 *)
31                         echo "Pack $pack rejected because it is not in PACKFILTER."
32                         return
33                         ;;
34         esac
35         case " $LICENSEFILTER " in
36                 "  ")
37                         ;;
38                 *" $license "*)
39                         ;;
40                 *)
41                         echo "Pack $pack rejected because its license is not in LICENSEFILTER."
42                         return
43                         ;;
44         esac
45         case "$BATCH" in
46                 '')
47                         while :; do
48                                 echo "Download this pack? (y/n)"
49                                 read -r P
50                                 case "$P" in
51                                         y*)
52                                                 break
53                                                 ;;
54                                         n*)
55                                                 return
56                                                 ;;
57                                 esac
58                         done
59                         ;;
60                 *)
61                         ;;
62         esac
63         
64         echo "Downloading $pack..."
65         case "$sourcetype" in
66                 svn)
67                         svn checkout "$source" "games/$pack" "$@"
68                         ;;
69         esac
70 }
71
72 pack NexuizPack      GPL         svn svn://svn.icculus.org/nexuiz/trunk/misc/netradiant-NexuizPack
73 pack Quake2WorldPack GPL         svn svn://jdolan.dyndns.org/quake2world/trunk/gtkradiant
74 pack DarkPlacesPack  GPL         svn https://zerowing.idsoftware.com/svn/radiant.gamepacks/DarkPlacesPack/branches/1.5/
75 pack WarsowPack      GPL         svn http://opensvn.csie.org/warsowgamepack/netradiant/games/WarsowPack/
76 pack Q3Pack          proprietary svn https://zerowing.idsoftware.com/svn/radiant.gamepacks/Q3Pack/trunk/ -r29
77 pack UFOAIPack       proprietary svn https://zerowing.idsoftware.com/svn/radiant.gamepacks/UFOAIPack/branches/1.5/