allow undo “make detail/structural”, <3 @SpiKe, thanks @Garux, fix #76
[xonotic/netradiant.git] / download-gamepacks.sh
index a99499e..75c1c3d 100755 (executable)
@@ -2,7 +2,7 @@
 
 # Usage:
 #   sh download-gamepack.sh
-#   LICENSEFILTER=GPL BATCH=1 sh download-gamepack.sh
+#   LICENSEFILTER=GPL,BSD BATCH=1 sh download-gamepack.sh
 
 : ${GIT:=git}
 : ${SVN:=svn}
@@ -11,7 +11,7 @@
 : ${MKDIR:=mkdir}
 : ${RM_R:=rm -f -r}
 : ${MV:=mv}
-: ${UNZIP:=unzip}
+: ${UNZIPPER:=unzip}
 
 set -e
 
@@ -42,7 +42,7 @@ pack()
                                $MKDIR zipdownload
                                cd zipdownload
                                $WGET "$source" "$@" || true
-                               $UNZIP *
+                               $UNZIPPER *.zip || true
                                cd ..
                                $RM_R "games/$pack"
                                $MKDIR "games/$pack"
@@ -83,11 +83,12 @@ pack()
        case " $LICENSEFILTER " in
                "  ")
                        ;;
-               *" $license "*)
-                       ;;
                *)
-                       $ECHO "Pack $pack rejected because its license is not in LICENSEFILTER."
-                       return
+                       if ! echo "$LICENSEFILTER" | tr ',' '\n' | grep -F -q -x "$license"
+                       then
+                               $ECHO "Pack $pack rejected because its license is not in LICENSEFILTER."
+                               return
+                       fi
                        ;;
        esac
        case "$BATCH" in
@@ -119,7 +120,7 @@ pack()
                        $MKDIR zipdownload
                        cd zipdownload
                        $WGET "$source" "$@" || true
-                       $UNZIP * || true
+                       $UNZIPPER *.zip || true
                        cd ..
                        $MKDIR "games/$pack"
                        $MV zipdownload/*/* "games/$pack/" || true
@@ -147,14 +148,32 @@ pack()
 }
 
 mkdir -p games
-pack DarkPlacesPack  GPL         svn    https://zerowing.idsoftware.com/svn/radiant.gamepacks/DarkPlacesPack/branches/1.5/
-pack NexuizPack      GPL         gitdir git://git.icculus.org/divverent/nexuiz.git misc/netradiant-NexuizPack master
-pack OpenArenaPack   unknown     zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/OpenArenaPack.zip
-pack Q3Pack          proprietary svn    https://zerowing.idsoftware.com/svn/radiant.gamepacks/Q3Pack/trunk/ -r29
-pack Quake2Pack      proprietary zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/Quake2Pack.zip
-pack Quake2WorldPack GPL         svn    svn://jdolan.dyndns.org/quake2world/trunk/gtkradiant
-pack QuakePack       proprietary zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/QuakePack.zip
-pack TremulousPack   proprietary zip1   http://ingar.satgnu.net/files/gtkradiant/gamepacks/TremulousPack.zip
-pack UFOAIPack       proprietary svn    https://zerowing.idsoftware.com/svn/radiant.gamepacks/UFOAIPack/branches/1.5/
-#pack WarsowPack      GPL         svn    https://svn.bountysource.com/wswpack/trunk/netradiant/games/WarsowPack/
-pack XonoticPack     GPL         git    git://git.xonotic.org/xonotic/netradiant-xonoticpack.git
+pack DarkPlacesPack    GPL         svn    svn://svn.icculus.org/gtkradiant-gamepacks/DarkPlacesPack/branches/1.5/
+pack Doom3Pack         proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/Doom3Pack/branches/1.5/
+pack ETPack            proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/ETPack/branches/1.5/
+pack Heretic2Pack      proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/Her2Pack/branches/1.5/
+pack JediAcademyPack   proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/JAPack/branches/1.5/
+pack NeverballPack     proprietary zip1   http://ingar.intranifty.net/files/netradiant/gamepacks/NeverballPack.zip
+pack NexuizPack        GPL         gitdir git://git.icculus.org/divverent/nexuiz.git misc/netradiant-NexuizPack master
+#pack OpenArenaPack    unknown     zip1   http://ingar.satgnu.net/files/netradiant/gamepacks/OpenArenaPack.zip
+pack OpenArenaPack     GPL         git    https://github.com/NeonKnightOA/oagamepack.git
+pack OsirionPack       GPL         zip1   http://ingar.intranifty.net/files/netradiant/gamepacks/OsirionPack.zip
+pack PreyPack          proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/PreyPack/trunk/
+pack Q3Pack            proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/Q3Pack/trunk/ -r29
+pack Quake2Pack        proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/Q2Pack/branches/1.5/
+pack Quake4Pack        proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/Q4Pack/branches/1.5/
+#pack QuakePack        proprietary zip1   http://ingar.intranifty.net/files/netradiant/gamepacks/QuakePack.zip
+pack QuakePack         GPL         zip1   http://ingar.intranifty.net/files/netradiant/gamepacks/Quake1Pack.zip
+#pack Quake2WorldPack  GPL         svn    svn://jdolan.dyndns.org/quake2world/trunk/gtkradiant
+pack QuetooPack        GPL         svn    svn://svn.icculus.org/gtkradiant-gamepacks/QuetooPack/branches/1.5/
+#pack TremulousPack    proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/TremulousPack/branches/1.5/
+pack TremulousPack     proprietary zip1   http://ingar.intranifty.net/files/netradiant/gamepacks/TremulousPack.zip
+pack TurtleArenaPack   proprietary git    https://github.com/Turtle-Arena/turtle-arena-radiant-pack.git
+pack UFOAIPack         proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/UFOAIPack/branches/1.5/
+#pack UnvanquishedPack unknown     zip1   http://ingar.intranifty.net/gtkradiant/files/gamepacks/UnvanquishedPack.zip
+pack UnvanquishedPack  BSD         svn    https://github.com/Unvanquished/unvanquished-mapeditor-support.git/trunk/build/netradiant
+#pack WarsowPack       GPL         svn    https://svn.bountysource.com/wswpack/trunk/netradiant/games/WarsowPack/
+#pack WarsowPack       GPL         zip1   http://ingar.intranifty.net/files/netradiant/gamepacks/WarsowPack.zip
+pack WarsowPack        GPL         git    https://github.com/Warsow/NetRadiantPack.git
+pack WolfPack          proprietary svn    svn://svn.icculus.org/gtkradiant-gamepacks/WolfPack/branches/1.5/
+pack XonoticPack       GPL         git    https://gitlab.com/xonotic/netradiant-xonoticpack.git