]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - gamepack-manager
gamepack-manager: remove the validated list, as all available packages are validated
[xonotic/netradiant.git] / gamepack-manager
1 #! /usr/bin/env bash
2
3 # get usage help this way:
4 # ./gamepack_manager -h
5
6 : "${CP:=cp -va}"
7 : "${CP_R:=cp -Rva}"
8 : "${GIT:=git}"
9 : "${SVN:=svn}"
10 : "${WGET:=wget}"
11 : "${ECHO:=echo}"
12 : "${MKDIR:=mkdir -v}"
13 : "${MKDIR_P:=mkdir -vp}"
14 : "${RM_R:=rm -vrf}"
15 : "${MV:=mv -v}"
16 : "${TAR:=tar}"
17 : "${UNZIPPER:=unzip}"
18
19 set -e
20
21 default_download_dir='build/download'
22 default_install_dir='build'
23
24 games_dir='games'
25 pack_suffix='Pack'
26
27 free_license_list='BSD GPL'
28
29 printRawDB () {
30 cat <<\EOF
31 #######################################################
32 #                                                     #
33 #  IMPORTANT IMPORTANT IMPORTANT IMPORTANT IMPORTANT  #
34 #                                                     #
35 #   Use two whitespaces or more as column separator   #
36 #                                                     #
37 #######################################################
38
39 #######################################################
40 # Obsolete packs                                      #
41 #######################################################
42
43 # Quake2World was renamed as Quetoo.
44 # JediAcademy and JediOutcast gamepacks are unusable.
45 # Other gamepacks have better version available.
46
47 # JediAcademy    proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/JAPack/branches/1.5/
48 # JediOutcast    proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/JK2Pack/trunk/
49 # Kingpin        unknown      zip     http://download.kingpin.info/kingpin/editing/maps/map_editors/NetRadiant/addon/Kingpinpack.zip
50 # Neverball      proprietary  zip     http://ingar.intranifty.net/files/netradiant/gamepacks/NeverballPack.zip
51 # OpenArena      unknown      zip     http://ingar.intranifty.net/files/netradiant/gamepacks/OpenArenaPack.zip
52 # Quake2World    GPL          svn     svn://jdolan.dyndns.org/quake2world/trunk/gtkradiant
53 # Quake3         proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/Q3Pack/trunk/ 29
54 # Quake          proprietary  zip     http://ingar.intranifty.net/files/netradiant/gamepacks/QuakePack.zip
55 # Tremulous      proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/TremulousPack/branches/1.5/
56 # Tremulous      proprietary  zip     http://ingar.intranifty.net/files/netradiant/gamepacks/TremulousPack.zip
57 # Unvanquished   unknown      zip     http://ingar.intranifty.net/gtkradiant/files/gamepacks/UnvanquishedPack.zip
58 # Warfork        GPL          zip     https://cdn.discordapp.com/attachments/611741789237411850/659512520553267201/netradiant_warfork_gamepack.zip
59 # Warsow         GPL          svn     https://svn.bountysource.com/wswpack/trunk/netradiant/games/WarsowPack/
60 # Warsow         GPL          zip     http://ingar.intranifty.net/files/netradiant/gamepacks/WarsowPack.zip
61
62 #######################################################
63 # Usable packs                                        #
64 #######################################################
65
66 AlienArena      GPL          svn     https://svn.code.sf.net/p/alienarena-cc/code/trunk/tools/netradiant_gamepack/AlienArenaPack
67 DarkPlaces      GPL          svn     svn://svn.icculus.org/gtkradiant-gamepacks/DarkPlacesPack/branches/1.5/
68 Doom3           proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/Doom3Pack/branches/1.5/
69 ET              proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/ETPack/branches/1.5/
70 Heretic2        proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/Her2Pack/branches/1.5/
71 JediAcademy     proprietary  git     https://gitlab.com/netradiant/gamepacks/jediacademy-mapeditor-support.git
72 JediOutcast     proprietary  git     https://gitlab.com/netradiant/gamepacks/jedioutcast-mapeditor-support.git
73 Kingpin         unknown      git     https://gitlab.com/netradiant/gamepacks/kingpin-mapeditor-support.git
74 Neverball       proprietary  git     https://gitlab.com/netradiant/gamepacks/neverball-mapeditor-support.git
75 Nexuiz          GPL          gitdir  git://git.icculus.org/divverent/nexuiz.git misc/netradiant-NexuizPack master
76 OpenArena       GPL          git     https://github.com/NeonKnightOA/oagamepack.git
77 Osirion         GPL          zip     http://ingar.intranifty.net/files/netradiant/gamepacks/OsirionPack.zip
78 Prey            proprietary  git     https://gitlab.com/netradiant/gamepacks/prey-mapeditor-support.git
79 Q3Rally         proprietary  svn     https://svn.code.sf.net/p/q3rallysa/code/tools/radiant-config/radiant15-netradiant/
80 Quake2          proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/Q2Pack/branches/1.5/
81 Quake3          proprietary  git     https://gitlab.com/netradiant/gamepacks/quake3-mapeditor-support.git
82 Quake4          proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/Q4Pack/branches/1.5/
83 QuakeLive       proprietary  git     https://gitlab.com/netradiant/gamepacks/quakelive-mapeditor-support.git
84 Quake           GPL          zip     http://ingar.intranifty.net/files/netradiant/gamepacks/Quake1Pack.zip
85 Quetoo          GPL          svn     svn://svn.icculus.org/gtkradiant-gamepacks/QuetooPack/branches/1.5/
86 SmokinGuns      unknown      git     https://github.com/smokin-guns/smokinguns-mapeditor-support.git
87 SoF2            unknown      git     https://gitlab.com/netradiant/gamepacks/sof2-mapeditor-support.git
88 STVEF           unknown      git     https://gitlab.com/netradiant/gamepacks/stvef-mapeditor-support.git
89 Tremulous       proprietary  git     https://gitlab.com/netradiant/gamepacks/tremulous-mapeditor-support.git
90 TurtleArena     proprietary  git     https://github.com/Turtle-Arena/turtle-arena-radiant-pack.git
91 UFOAI           proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/UFOAIPack/branches/1.5/
92 Unvanquished    BSD          git     https://github.com/Unvanquished/unvanquished-mapeditor-support.git
93 UrbanTerror     unknown      git     https://gitlab.com/netradiant/gamepacks/urbanterror-mapeditor-support.git
94 Warfork         GPL          git     https://gitlab.com/netradiant/gamepacks/warfork-mapeditor-support.git
95 Warsow          GPL          git     https://github.com/Warsow/NetRadiantPack.git
96 Wolf            proprietary  svn     svn://svn.icculus.org/gtkradiant-gamepacks/WolfPack/branches/1.5/
97 WoP             proprietary  git     https://github.com/PadWorld-Entertainment/wop-mapeditor-support.git
98 Wrath           GPL          git     https://gitlab.com/netradiant/gamepacks/wrath-mapeditor-support.git
99 Xonotic         GPL          git     https://gitlab.com/xonotic/netradiant-xonoticpack.git
100 ZEQ2Lite        unknown      git     https://gitlab.com/netradiant/gamepacks/zeq2lite-mapeditor-support.git
101 EOF
102 }
103
104 if command -v gsed >/dev/null
105 then
106         SED=gsed
107 elif sed --help >/dev/null 2>&1
108 then
109         SED=sed
110 else
111         printf 'ERROR: GNU sed is missing\n' >&2
112         exit 1
113 fi
114
115 printRealPath ()
116 {
117         if command -v grealpath >/dev/null
118         then
119                 grealpath "${1}"
120         elif command -v realpath >/dev/null
121         then
122                 realpath "${1}"
123         elif command -v greadlink >/dev/null
124         then
125                 # test greadlink first as greadlink has the feature on macos
126                 # but readlink only has it on linux, note that it's probably
127                 # the same on bsd
128                 # note: (g)readlink requires the file to be create first
129                 greadlink -f "${1}"
130         elif command -v readlink >/dev/null
131         then
132                 # --help and -f options are GNU readlink things
133                 if readlink --help >/dev/null 2>&1
134                 then
135                         readlink -f "${1}"
136                 else
137                         if ! python -c "import os; print(os.path.realpath('${1}'))"
138                         then
139                                 printf 'ERROR: GNU realpath or other way to compute real path of a file is missing\n' >&2
140                                 exit 1
141                         fi
142                 fi
143         fi
144 }
145
146 sanitizeDB () {
147         ${SED} -e 's/#.*//;s/[ \t][ \t][ \t]*/\t/g;s/^[ \t]*//;s/[ \t]*$//' \
148         | grep -v '^$'
149 }
150
151 inList () {
152         [ "$(grep "^${1}$")" = "${1}" ]
153 }
154
155 printList () {
156         echo "${1}" \
157         | tr ' ' '\n' \
158         | grep -v '^$' \
159         | sort -u
160 }
161
162 dedupeList () {
163         printList "${1}" \
164         | tr '\n' ' ' \
165         | ${SED} -e 's/ $//'
166 }
167
168 printGamePackDB () {
169         printRawDB \
170         | sanitizeDB
171 }
172
173 printLicenseList () {
174         printGamePackDB \
175         | awk '{ print $2 }' \
176         | sort -u
177 }
178
179 printNameList () {
180         printGamePackDB \
181         | awk '{ print $1 }' \
182         | sort -u
183 }
184
185 printNameListByLicense () {
186         local arg_license_list
187         local license_list
188         local license
189
190         arg_license_list="${1}"
191         license_list=''
192
193         for license in ${arg_license_list}
194         do
195                 case "${license}" in
196                         'none')
197                                 break
198                                 ;;
199                         'all')
200                                 license_list="$(printLicenseList)"
201                                 break
202                                 ;;
203                         'free')
204                                 license_list="${license_list} ${free_license_list}"
205                                 ;;
206                         *)
207                                 if printLicenseList | inList "${license}"
208                                 then
209                                         license_list="${license_list} ${license}"
210                                 else
211                                         printError "unknown license: ${license}"
212                                 fi
213                                 ;;
214                 esac
215         done
216
217         license_list="$(dedupeList "${license_list}")"
218
219         for license in ${license_list}
220         do
221                 printGamePackDB \
222                 | awk '$2 == "'"${license}"'"' \
223                 | awk '{ print $1 }'
224         done | sort -u
225 }
226
227 printNameListByName () {
228         local argname_list
229         local name_list
230         local name
231
232         argname_list="${1}"
233         name_list=''
234
235         for name in ${argname_list}
236         do
237                 case "${name}" in
238                         'none')
239                                 break
240                                 ;;
241                         'all')
242                                 name_list="$(printNameList)"
243                                 break
244                                 ;;
245                         *)
246                                 if printNameList | inList "${name}"
247                                 then
248                                         name_list="${name_list} ${name}"
249                                 else
250                                         printError "unknown name: ${name}"
251                                 fi
252                                 ;;
253                 esac
254         done
255
256         name_list="$(dedupeList "${name_list}")"
257
258         for name in ${name_list}
259         do
260                 printGamePackDB \
261                 | awk '$1 == "'"${name}"'"' \
262                 | awk '{ print $1 }'
263         done
264 }
265
266 printPackLine () {
267         local name
268
269         name="${1}"
270
271         printGamePackDB \
272         | awk '$1 == "'"${name}"'"'
273 }
274
275 getValue () {
276         local name
277         local key
278
279         name="${1}"
280         key="${2}"
281
282         printPackLine "${name}" \
283         | awk '{ print $'"${key}"' }'
284 }
285
286 downloadExtraUrls ()
287 {
288         if [ -f 'extra-urls.txt' ]
289         then
290                 local line
291                 while read line
292                 do
293                         local extra_file="$(echo "${line}" | cut -f1 -d$'\t')"
294                         local extra_url="$(echo "${line}" | cut -f2 -d$'\t')"
295                         ${WGET} -O "${extra_file}" "${extra_url}" < /dev/null
296                 done < 'extra-urls.txt'
297         fi
298 }
299
300 downloadPack () {
301         local download_dir
302         local name
303         local license
304         local source_type
305         local source_url
306         local pack
307         local reference
308         local subdir
309         local branch
310
311         download_dir="${1}"
312         name="${2}"
313
314         license="$(getValue "${name}" 2)"
315         source_type="$(getValue "${name}" 3)"
316         source_url="$(getValue "${name}" 4)"
317
318         pack="${name}${pack_suffix}"
319
320         ${MKDIR_P} "${download_dir}"
321
322         (
323                 cd "${download_dir}"
324
325                 ${ECHO} ''
326                 ${ECHO} "Available pack: ${pack}"
327                 ${ECHO} "  License: ${license}"
328                 ${ECHO} "  Download via ${source_type} from ${source_url}"
329                 ${ECHO} ''
330
331                 if [ -d "${download_dir}/${pack}" ]
332                 then
333                         ${ECHO} "Updating ${name}…"
334                 else
335                         ${ECHO} "Downloading ${pack}…"
336                 fi
337
338                 case "${source_type}" in
339                         'svn')
340                                 reference="$(getValue "${name}" 5)"
341                                 if [ -z "${reference}" ]
342                                 then
343                                         reference='HEAD'
344                                 fi
345
346                                 if [ -d "${pack}" ]
347                                 then
348                                         if [ -d "${pack}/.git" ]
349                                         then
350                                                 (
351                                                         cd "${pack}"
352                                                         ${GIT} svn fetch
353                                                 )
354                                         else
355                                                 ${SVN} update -r"${reference}" "${pack}"
356                                         fi
357                                 else
358                                         ${SVN} checkout -r"${reference}" "${source_url}" "${pack}" \
359                                         || ${GIT} svn clone "${source_url}" "${pack}"
360                                 fi
361                                 ;;
362                         'zip')
363                                 ${RM_R} 'zipdownload'
364                                 ${MKDIR} 'zipdownload'
365                                 (
366                                         cd 'zipdownload'
367                                         ${WGET} "${source_url}"
368                                         ${UNZIPPER} './'*.zip
369                                 )
370                                 ${RM_R} "${pack}"
371                                 ${MKDIR} "${pack}"
372                                 if [ -d 'zipdownload/games' ]
373                                 then
374                                         ${MV} 'zipdownload/'* "${pack}/"
375                                 else
376                                         ${MV} 'zipdownload/'*'/'* "${pack}/"
377                                 fi
378                                 ${RM_R} 'zipdownload'
379                                 ;;
380                         'gitdir')
381                                 local subdir="$(getValue "${name}" 5)"
382                                 local branch="$(getValue "${name}" 6)"
383                                 ${RM_R} "${pack}"
384                                 ${GIT} archive --remote="${source_url}" --prefix="${pack}/" "${branch}":"${subdir}" \
385                                 | ${TAR} xvf -
386                                 ;;
387                         'git')
388                                 if [ -d "${pack}" ]
389                                 then
390                                         (
391                                                 cd "${pack}"
392                                                 ${GIT} pull
393                                         )
394                                 else
395                                         ${GIT} clone "${source_url}" "${pack}"
396                                 fi
397                                 ;;
398                 esac
399
400                 if [ -d "${pack}" ]
401                 then
402                         (
403                                 cd "${pack}"
404                                 downloadExtraUrls
405                         )
406                 fi
407
408         )
409 }
410
411 downloadPackList () {
412         local download_dir
413         local name_list
414
415         download_dir="${1}"
416         name_list="${2}"
417
418         for name in ${name_list}
419         do
420                 if printNameList | inList "${name}"
421                 then
422                         downloadPack "${download_dir}" "${name}"
423                 else
424                         printError "unknown name: ${name}"
425                 fi
426         done
427 }
428
429 installPack () {
430         local download_dir
431         local install_dir
432         local name
433         local pack
434         local path
435         local game_file
436         local game_dir
437
438         download_dir="${1}"
439         install_dir="${2}"
440         name="${3}"
441
442         pack="${name}${pack_suffix}"
443
444         ${MKDIR_P} "${install_dir}/${games_dir}"
445
446         # Some per-game workaround for malformed gamepack
447         case "${name}" in
448                 'Wolf')
449                         pack="${pack}/bin"
450                         ;;
451         esac
452
453         # Game packs built with mkeditorpacks
454         if [ -d "${download_dir}/${pack}/build/netradiant" ]
455         then
456                 pack="${pack}/build/netradiant"
457         elif [ -d "${download_dir}/${pack}/netradiant" ]
458         # Other known layout
459         then
460                 pack="${pack}/netradiant"
461         fi
462
463         path="${download_dir}/${pack}"
464
465         for game_file in "${path}/${games_dir}/"*'.game'
466         do
467                 if [ x"${game_file}" != x"${path}/"*'.game' ]
468                 then
469                         ${CP} "${game_file}" "${real_install_dir}/${games_dir}/"
470                 fi
471         done
472
473         for game_dir in "${path}/"*'.game'
474         do
475                 if [ x"${game_dir}" != x"${path}/"*'.game' ]
476                 then
477                         ${CP_R} "${game_dir}" "${real_install_dir}/"
478                 fi
479         done
480 }
481
482 installPackList () {
483         local download_dir
484         local install_dir
485         local name_list
486
487         download_dir="${1}"
488         install_dir="${2}"
489         name_list="${3}"
490
491         for name in ${name_list}
492         do
493                 if printNameList | inList "${name}"
494                 then
495                         installPack "${download_dir}" "${install_dir}" "${name}"
496                 else
497                         printError "unknown name: ${name}"
498                 fi
499         done
500 }
501
502 printError () {
503         printf 'ERROR: %s\n' "${1}" >&2
504         exit 1
505 }
506
507 printHelp () {
508         local tab
509         local prog_name
510
511         tab="$(printf '\t')"
512         prog_name='gamepack-manager'
513
514         cat <<-EOF
515         Usage: ${prog_name} [OPTION] [SELECTION <ARGUMENTS>] [ACTION]
516
517         OPTIONS:
518         ${tab}-dd, --download-dir DIRNAME
519         ${tab}${tab}store downloaded games to DIRNAME (default: ${default_download_dir})
520
521         ${tab}-id, --install-dir DIRNAME
522         ${tab}${tab}store installed games to DIRNAME (default: ${default_install_dir})
523
524         SELECTIONS:
525         ${tab}-n, --name NAMES…
526         ${tab}${tab}select games by name (default: none)
527         ${tab}${tab}special keyword: all, none
528         ${tab}${tab}available games:
529         $(printNameList | ${SED} -e 's/^/\t\t\t/')
530
531         ${tab}-l, --license LICENSES…
532         ${tab}${tab}select games by license (default: none)
533         ${tab}${tab}special keyword: free, all, none
534         ${tab}${tab}available licenses:
535         $(printLicenseList | ${SED} -e 's/^/\t\t\t/')
536
537         ACTIONS:
538         ${tab}-ln, --list-names
539         ${tab}${tab}list all game names
540
541         ${tab}-ll, --list-licenses
542         ${tab}${tab}list all game licenses
543
544         ${tab}-ls, --list-selected
545         ${tab}${tab}list selected games
546
547         ${tab}-d, --download
548         ${tab}${tab}download selected games
549
550         ${tab}-i, --install
551         ${tab}${tab}install selected games
552
553         ${tab}-h, --help
554         ${tab}${tab}print this help
555
556         Examples:
557         ${tab}${prog_name} --license GPL BSD --list-selected
558         ${tab}${prog_name} --license GPL BSD --download --install
559
560         ${tab}${prog_name} --name all --list-selected
561         ${tab}${prog_name} --name all --download --install
562
563         EOF
564
565         exit
566 }
567
568 option_list=''
569
570 list_selected='false'
571 list_licenses='false'
572 list_names='false'
573
574 download_packs='false'
575 install_packs='false'
576
577 mkdir_download='false'
578 mkdir_install='false'
579
580 by_license='false'
581 by_name='false'
582
583 arg_type=''
584 selected_list=''
585 license_list=''
586 name_list=''
587 install_dir=''
588
589 while ! [ -z "${1}" ]
590 do
591
592         if printList "${option_list}" | inList "${1}"
593         then
594                 printError "option called more than once: ${1}"
595         fi
596
597         if echo "${@}" | tr ' ' '\n' | inList '--help'
598         then
599                 printHelp
600         elif echo "${@}" | tr ' ' '\n' | inList '-h'
601         then
602                 printHelp
603         fi
604
605         case "${1}" in
606                 '--list-names'|'-ln')
607                         arg_type=''
608                         list_names='true'
609                         option_list="${option_list} ${1}"
610                         ;;
611                 '--list-licenses'|'-ll')
612                         arg_type=''
613                         list_licenses='true'
614                         option_list="${option_list} ${1}"
615                         ;;
616                 '--list-selected'|'-ls')
617                         arg_type=''
618                         list_selected='true'
619                         option_list="${option_list} ${1}"
620                         ;;
621                 '--download'|'-d')
622                         arg_type=''
623                         download_packs='true'
624                         mkdir_download='true'
625                         option_list="${option_list} ${1}"
626                         ;;
627                 '--install'|'-i')
628                         arg_type=''
629                         install_packs='true'
630                         mkdir_download='true'
631                         mkdir_install='true'
632                         option_list="${option_list} ${1}"
633                         ;;
634                 '--license'|'-l')
635                         by_license='true'
636                         arg_type='pack-license'
637                         option_list="${option_list} ${1}"
638                         ;;
639                 '--name'|'-n')
640                         by_name='true'
641                         arg_type='pack-name'
642                         option_list="${option_list} ${1}"
643                         ;;
644                 '--download-dir'|'-dd')
645                         arg_type='download-dir'
646                         option_list="${option_list} ${1}"
647                         ;;
648                 '--install-dir'|'-id')
649                         arg_type='install-dir'
650                         option_list="${option_list} ${1}"
651                         ;;
652                 '-'*)
653                         printError "unknown option: ${1}"
654                         ;;
655                 *)
656                         case "${arg_type}" in
657                                 'pack-name')
658                                         name_list="${name_list} ${1}"
659                                         ;;
660                                 'pack-license')
661                                         license_list="${license_list} ${1}"
662                                         ;;
663                                 'download-dir')
664                                         if [ -z "${download_dir}" ]
665                                         then
666                                                 download_dir="${1}"
667                                         else
668                                                 printError "more than one download dir: ${1}"
669                                         fi
670                                         ;;
671                                 'install-dir')
672                                         if [ -z "${install_dir}" ]
673                                         then
674                                                 install_dir="${1}"
675                                         else
676                                                 printError "more than one install dir: ${1}"
677                                         fi
678                                         ;;
679                                 *)
680                                         printError "misplaced argument: ${1}"
681                                         ;;
682                         esac
683                         ;;
684         esac
685
686         shift
687 done
688
689 # compatibility with legacy Makefile
690 if [ "${DOWNLOAD_GAMEPACKS}" = 'yes' ]
691 then
692         if ! [ -z "${DOWNLOADDIR}" ]
693         then
694                 download_dir="${DOWNLOADDIR}"
695         fi
696
697         if ! [ -z "${INSTALLDIR}" ]
698         then
699                 install_dir="${INSTALLDIR}"
700         fi
701
702         license_list='free'
703         by_license='true'
704
705         download_packs='true'
706         mkdir_download='true'
707
708         install_packs='true'
709         mkdir_install='true'
710 fi
711
712 if [ -z "${download_dir}" ]
713 then
714         download_dir="${default_download_dir}"
715 fi
716
717 if [ -z "${install_dir}" ]
718 then
719         install_dir="${default_install_dir}"
720 fi
721
722 if "${by_name}"
723 then
724         selected_list="${selected_list} $(printNameListByName "${name_list}")"
725 fi
726
727 if "${by_license}"
728 then
729         selected_list="${selected_list} $(printNameListByLicense "${license_list}")"
730 fi
731
732 selected_list="$(dedupeList "${selected_list}")"
733
734 if "${mkdir_download}"
735 then
736         ${MKDIR_P} "${download_dir}"
737         real_download_dir="$(printRealPath "${download_dir}")"
738 fi
739
740 if "${mkdir_install}"
741 then
742         ${MKDIR_P} "${install_dir}"
743         real_install_dir="$(printRealPath "${install_dir}")"
744 fi
745
746 if "${list_names}"
747 then
748         printNameList
749 fi
750
751 if "${list_licenses}"
752 then
753         printLicenseList
754 fi
755
756 if "${list_selected}"
757 then
758         printList "${selected_list}"
759 fi
760
761 if "${download_packs}"
762 then
763         downloadPackList "${real_download_dir}" "${selected_list}"
764 fi
765
766 if "${install_packs}"
767 then
768         installPackList "${real_download_dir}" "${real_install_dir}" "${selected_list}"
769 fi
770
771 #EOF