Go to most recent revision | Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 656 | leod | 1 | #!/bin/bash |
| 320 | leod | 2 | |
| 708 | leod | 3 | # Duke Nukem 3D High Resolution Pack Extractor v0.8.0 2019-05-07 |
| 320 | leod | 4 | # |
| 5 | # Author: LeoD |
||
| 708 | leod | 6 | # License: ISC license : https://opensource.org/licenses/isc-license.txt |
| 320 | leod | 7 | # |
| 408 | leod | 8 | # This script extracts a working copy of your local Duke Nukem 3D High |
| 9 | # Resolution Pack's Subversion repository, ready for zipping and distribution. |
||
| 10 | # This is mostly done by hierarchically parsing the *.def files. |
||
| 11 | # PolyMER or PolyMOST only versions can be chosen. |
||
| 333 | leod | 12 | # On Windows you might want MSYS' zip to create package files. |
| 320 | leod | 13 | # ("mingw-get install msys-zip") |
| 14 | # MinGW/MSYS performance is horrible, better go Linux. Even my virtual Debian |
||
| 15 | # machine accessing the Windows drive is 5 to 10 times faster. |
||
| 16 | # But it still sucks. This needs to become a Perl script one day. |
||
| 333 | leod | 17 | # Or maybe MSYS' bash gets finally updated to 4.* and I'll use its regex engine. |
| 320 | leod | 18 | |
| 331 | leod | 19 | DEF_TOP=UNDEFINED |
| 20 | SET_VERSION=YES # [YES|NO] |
||
| 324 | leod | 21 | EXTRACT_COMMENTED_FILES=NO # [YES|NO] |
| 431 | leod | 22 | DUKEPLUS_POLYMOST_COMPATIBILTY_APPROACH=polymost #[none|polymost|polymer|mixed] |
| 23 | ATTRITION_POLYMOST_COMPATIBILTY_APPROACH=polymost #[none|polymost|polymer|mixed] |
||
| 324 | leod | 24 | |
| 320 | leod | 25 | ask() |
| 26 | { |
||
| 27 | echo -n "$@" '[y/N] ' ; read ans |
||
| 28 | case "$ans" in |
||
| 29 | y*|Y*) return 0 ;; |
||
| 30 | *) return 1 ;; |
||
| 31 | esac |
||
| 32 | } # ask |
||
| 33 | |||
| 34 | |||
| 35 | copy_folders() |
||
| 36 | { |
||
| 37 | mkdir ${EXTRACTDIR} |
||
| 38 | for HRPDIR in . ; do |
||
| 39 | if [ -d "${HRPDIR}" ] ; then |
||
| 40 | DIRLIST=./HRP_DIRECTORIES.lst |
||
| 661 | leod | 41 | find "${HRPDIR}" -type d | grep -v ".\svn" > ${DIRLIST} |
| 320 | leod | 42 | cat ${DIRLIST} | while read DIR; do |
| 43 | if [ ! -d "${EXTRACTDIR}/${DIR}" ] ; then |
||
| 44 | mkdir "${EXTRACTDIR}/${DIR}" |
||
| 45 | fi |
||
| 46 | done |
||
| 47 | rm ${DIRLIST} |
||
| 48 | else |
||
| 49 | echo "${HRPDIR} : no HRP." |
||
| 50 | fi |
||
| 51 | done |
||
| 52 | } # copy_folders() |
||
| 53 | |||
| 54 | |||
| 324 | leod | 55 | copy_set_version() |
| 56 | { |
||
| 57 | VER_FILE="$1" |
||
| 58 | TARGET_FILE="$2" |
||
| 657 | leod | 59 | if [ ! "${SET_VERSION}" = "YES" ] ; then |
| 60 | cp -pv "${VER_FILE}" "${TARGET_FILE}" |
||
| 61 | else |
||
| 62 | |||
| 63 | V_DATE=`date +%F` |
||
| 64 | if [ "${VERSION}" = "" ] ; then |
||
| 65 | if [ -f VERSION ] ; then |
||
| 66 | VERSION=`grep -owE "[0-9\\.]*" VERSION` |
||
| 67 | fi |
||
| 324 | leod | 68 | fi |
| 69 | |||
| 657 | leod | 70 | echo "copy_set_version ${VER_FILE} -> ${TARGET_FILE}" |
| 324 | leod | 71 | |
| 657 | leod | 72 | case "${VER_FILE}" in |
| 73 | hrp_readme.txt) |
||
| 325 | leod | 74 | cat "${VER_FILE}" | sed -r --posix \ |
| 657 | leod | 75 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)\(\\\)\)\(.*\)/\\1${VERSION}\ \(${V_DATE}\)\ \ \\5/ \ |
| 325 | leod | 76 | >> "${TARGET_FILE}" |
| 657 | leod | 77 | ;; |
| 78 | duke3d_hrp.def) |
||
| 79 | if [ "${HRPTYPE}" = "polymer" ] ; then |
||
| 80 | cat "${VER_FILE}" | sed -r --posix \ |
||
| 81 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)/\\1${VERSION}\ Polymer\\3/ \ |
||
| 82 | >> "${TARGET_FILE}" |
||
| 83 | else |
||
| 84 | cat "${VER_FILE}" | sed -r --posix \ |
||
| 85 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)/\\1${VERSION}\\3/ \ |
||
| 86 | >> "${TARGET_FILE}" |
||
| 87 | fi |
||
| 88 | ;; |
||
| 89 | duke3d_hrp_polymost.def | \ |
||
| 708 | leod | 90 | tools/polymost_override/duke3d_hrp_polymost_override.def | \ |
| 657 | leod | 91 | duke3d_hrp_megaton.def | \ |
| 708 | leod | 92 | tools/megaton_override/duke3d_hrp_megaton_override.def ) |
| 325 | leod | 93 | cat "${VER_FILE}" | sed -r --posix \ |
| 94 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)/\\1${VERSION}\\3/ \ |
||
| 95 | >> "${TARGET_FILE}" |
||
| 657 | leod | 96 | ;; |
| 97 | *) |
||
| 98 | echo "###ERROR: copy_set_version() - BAD FILE: ${VER_FILE}" |
||
| 99 | exit 1 |
||
| 100 | ;; |
||
| 101 | esac |
||
| 102 | fi |
||
| 103 | } # copy_set_version() |
||
| 324 | leod | 104 | |
| 330 | leod | 105 | tar_copy_dir() |
| 106 | { |
||
| 107 | (cd ${1}; tar cf - . ) | (cd ${2}; tar xf -) |
||
| 108 | } |
||
| 109 | |||
| 320 | leod | 110 | copy_known_files() |
| 111 | { |
||
| 657 | leod | 112 | if [ -f hrp_readme.txt ] ; then |
| 324 | leod | 113 | copy_set_version hrp_readme.txt "${EXTRACTDIR}/hrp_readme.txt" |
| 114 | fi |
||
| 320 | leod | 115 | |
| 431 | leod | 116 | if [ "${HRPTYPE}" = "polymost" ] || [ "${HRPTYPE}" = "polymost_override" ] ||\ |
| 639 | leod | 117 | [ "${HRPTYPE}" = "megaton" ] || [ "${HRPTYPE}" = "megaton_override" ] ||\ |
| 708 | leod | 118 | [ "${HRPTYPE}" = "maphacks" ] ||\ |
| 384 | leod | 119 | [ "${HRPTYPE}" = "polymer" ] || [ "${HRPTYPE}" = "full" ] ; then |
| 120 | cp -pv hrp_art_license.txt "${EXTRACTDIR}" |
||
| 121 | fi |
||
| 122 | |||
| 708 | leod | 123 | if [ "${HRPTYPE}" = "polymost" ] || [ "${HRPTYPE}" = "polymer" ] ||\ |
| 124 | [ "${HRPTYPE}" = "maphacks" ] || [ "${HRPTYPE}" = "full" ] ; then |
||
| 125 | cp -pv maphacks/MapHacks.txt "${EXTRACTDIR}/maphacks/" |
||
| 126 | fi |
||
| 127 | |||
| 431 | leod | 128 | if [ "${HRPTYPE}" = "polymost" ] ; then |
| 708 | leod | 129 | cp -pv duke3d_hrp_polymost.def "${EXTRACTDIR}" |
| 130 | copy_set_version duke3d_hrp_polymost.def "${EXTRACTDIR}/duke3d_hrp.def" |
||
| 131 | cp -pvr tools/polymost_override/dukedc "${EXTRACTDIR}" |
||
| 320 | leod | 132 | fi |
| 133 | |||
| 639 | leod | 134 | if [ "${HRPTYPE}" = "megaton" ] ; then |
| 661 | leod | 135 | cp -pv duke3d_hrp_megaton.def "${EXTRACTDIR}" |
| 657 | leod | 136 | copy_set_version duke3d_hrp_megaton.def "${EXTRACTDIR}/duke3d_hrp.def" |
| 656 | leod | 137 | cp -pv highres/screen/menu/2492_ver_megaton.png \ |
| 138 | "${EXTRACTDIR}/highres/screen/menu/2492_ver_polymost.png" |
||
| 708 | leod | 139 | cp -pvr tools/megaton_override/dukedc* "${EXTRACTDIR}" |
| 140 | cp -pvr tools/megaton_override/highres "${EXTRACTDIR}" |
||
| 639 | leod | 141 | fi |
| 142 | |||
| 431 | leod | 143 | if [ "${HRPTYPE}" = "polymost_override" ] ; then |
| 657 | leod | 144 | copy_set_version \ |
| 708 | leod | 145 | tools/polymost_override/duke3d_hrp_polymost_override.def \ |
| 657 | leod | 146 | "${EXTRACTDIR}/duke3d_hrp.def" |
| 147 | copy_set_version \ |
||
| 708 | leod | 148 | tools/polymost_override/duke3d_hrp_polymost_override.def \ |
| 657 | leod | 149 | "${EXTRACTDIR}/duke3d_hrp_polymost.def" |
| 708 | leod | 150 | cp -pv tools/polymost_override/hrp_polymost_override.txt \ |
| 661 | leod | 151 | "${EXTRACTDIR}" |
| 708 | leod | 152 | cp -pv tools/polymost_override/2492_ver_polymost_override.png \ |
| 661 | leod | 153 | "${EXTRACTDIR}/highres/screen/menu/2492_ver_polymost.png" |
| 708 | leod | 154 | cp -pvr tools/polymost_override/dukedc "${EXTRACTDIR}" |
| 431 | leod | 155 | fi |
| 156 | |||
| 639 | leod | 157 | if [ "${HRPTYPE}" = "megaton_override" ] ; then |
| 657 | leod | 158 | copy_set_version \ |
| 708 | leod | 159 | tools/megaton_override/duke3d_hrp_megaton_override.def \ |
| 657 | leod | 160 | "${EXTRACTDIR}/duke3d_hrp.def" |
| 161 | copy_set_version \ |
||
| 708 | leod | 162 | tools/megaton_override/duke3d_hrp_megaton_override.def \ |
| 657 | leod | 163 | "${EXTRACTDIR}/duke3d_hrp_megaton.def" |
| 708 | leod | 164 | cp -pv tools/megaton_override/hrp_megaton_override.txt \ |
| 661 | leod | 165 | "${EXTRACTDIR}" |
| 708 | leod | 166 | cp -pv tools/megaton_override/2492_ver_megaton_override.png \ |
| 167 | "${EXTRACTDIR}/highres/screen/menu/2492_ver_megaton.png" |
||
| 168 | cp -pv tools/megaton_override/*.bat "${EXTRACTDIR}" |
||
| 169 | cp -pvr tools/megaton_override/dukedc* "${EXTRACTDIR}" |
||
| 170 | cp -pvr tools/megaton_override/highres "${EXTRACTDIR}" |
||
| 657 | leod | 171 | # Let Megaton Override work on top of Polymost HRP: |
| 708 | leod | 172 | cp -pv highres/screen_megaton.def "${EXTRACTDIR}/highres/" |
| 173 | cp -pv highres/screen/menu_megaton.def "${EXTRACTDIR}/highres/" |
||
| 174 | cp -pv highres/sprites_megaton.def "${EXTRACTDIR}/highres/" |
||
| 175 | cp -pv highres/sprites/effects_megaton.def "${EXTRACTDIR}/highres/sprites/" |
||
| 639 | leod | 176 | fi |
| 177 | |||
| 178 | if [ "${HRPTYPE}" = "polymost" ] || [ "${HRPTYPE}" = "megaton" ] ; then |
||
| 320 | leod | 179 | cp -pv duke3d.def "${EXTRACTDIR}" |
| 659 | leod | 180 | cp -pv highres/screen/menu/2492_polymost.png \ |
| 708 | leod | 181 | "${EXTRACTDIR}/highres/screen/menu/" |
| 320 | leod | 182 | fi |
| 183 | |||
| 184 | if [ "${HRPTYPE}" = "full" ] ; then |
||
| 657 | leod | 185 | copy_set_version duke3d_hrp_polymost.def \ |
| 186 | "${EXTRACTDIR}/duke3d_hrp_polymost.def" |
||
| 187 | copy_set_version duke3d_hrp_megaton.def \ |
||
| 188 | "${EXTRACTDIR}/duke3d_hrp_megaton.def" |
||
| 320 | leod | 189 | fi |
| 190 | |||
| 431 | leod | 191 | if [ "${HRPTYPE}" = "full" ] ; then |
| 192 | cp -pv highres/screen/menu/2492_ver_polymost.png \ |
||
| 708 | leod | 193 | "${EXTRACTDIR}/highres/screen/menu/" |
| 320 | leod | 194 | fi |
| 195 | |||
| 196 | if [ "${HRPTYPE}" = "polymer" ] || [ "${HRPTYPE}" = "full" ] ; then |
||
| 708 | leod | 197 | cp -pv duke3d.def "${EXTRACTDIR}" |
| 657 | leod | 198 | copy_set_version duke3d_hrp.def "${EXTRACTDIR}/duke3d_hrp.def" |
| 320 | leod | 199 | #cp -pv highres/screen/menu/2492.png "${EXTRACTDIR}/highres/screen/menu" |
| 200 | |||
| 708 | leod | 201 | #cp -pv highres/common/black.png "${EXTRACTDIR}/highres/common/" |
| 202 | #cp -pv highres/screen/fonts/digital/digital_minus.png "${EXTRACTDIR}/highres/screen/fonts/digital/" |
||
| 203 | #cp -pv highres/screen/menu/widescreen/*_wide.png "${EXTRACTDIR}/highres/screen/menu/" |
||
| 204 | #cp -pv highres/sprites/characters/1357_terminarm.md3 "${EXTRACTDIR}/highres/sprites/characters/" |
||
| 205 | #cp -pv highres/sprites/firstperson/2510_devastator_n.png "${EXTRACTDIR}/highres/sprites/firstperson/" |
||
| 206 | #cp -pv highres/sprites/monsters/1960_reconcar_s.png "${EXTRACTDIR}/highres/sprites/monsters/" |
||
| 207 | #cp -pv highres/sprites/props/4387.png "${EXTRACTDIR}/highres/sprites/props/" |
||
| 208 | #cp -pv highres/sprites/signs/4378-79.png "${EXTRACTDIR}/highres/sprites/signs/" |
||
| 209 | #cp -pv highres/sprites/signs/4381-85.png "${EXTRACTDIR}/highres/sprites/signs/" |
||
| 320 | leod | 210 | fi |
| 211 | |||
| 708 | leod | 212 | if [ "${HRPTYPE}" = "maphacks" ] ; then |
| 709 | leod | 213 | cp -pv maphacks/MapHacks.txt "${EXTRACTDIR}" |
| 214 | cp -pv maphacks/mhk-extract.def "${EXTRACTDIR}/maphacks/" |
||
| 215 | cp -pv maphacks/maphacks_polymost.def "${EXTRACTDIR}/maphacks/" |
||
| 708 | leod | 216 | cp -pv duke3d_maphacks_standalone.def "${EXTRACTDIR}" |
| 217 | copy_set_version duke3d_maphacks_standalone.def "${EXTRACTDIR}/duke3d.def" |
||
| 218 | fi |
||
| 219 | |||
| 330 | leod | 220 | if [ "${HRPTYPE}" = "voxel" ] ; then |
| 708 | leod | 221 | cp -pv voxelpack_readme.txt "${EXTRACTDIR}" |
| 222 | cp -pv voxelpack_art_license.txt "${EXTRACTDIR}" |
||
| 223 | cp -pv duke3d.def "${EXTRACTDIR}" |
||
| 224 | cp -pv duke3d_voxels.def "${EXTRACTDIR}" |
||
| 225 | if [ -f EDUKE.CON ] ; then |
||
| 226 | cp -pv EDUKE.CON "${EXTRACTDIR}" |
||
| 227 | fi |
||
| 330 | leod | 228 | fi |
| 229 | |||
| 230 | if [ "${HRPTYPE}" = "sw_highres" ] ; then |
||
| 231 | cp -pv sw.def "${EXTRACTDIR}" |
||
| 708 | leod | 232 | cp -pv highres/sw_hrp.def "${EXTRACTDIR}/highres/" |
| 330 | leod | 233 | cp -pv HRP.bat "${EXTRACTDIR}" |
| 234 | cp -pv HRP_Readme.txt "${EXTRACTDIR}" |
||
| 235 | cp -pv HRP_Changes.txt "${EXTRACTDIR}" |
||
| 236 | echo "Copying skyboxes ..." |
||
| 237 | tar_copy_dir "highres/skyboxes" "${EXTRACTDIR}/highres/skyboxes" |
||
| 238 | cd "${WORKDIR}" |
||
| 239 | fi |
||
| 240 | |||
| 241 | if [ "${HRPTYPE}" = "sw_lowres" ] ; then |
||
| 384 | leod | 242 | echo "Creating sw.def for lowres HRP ..." |
| 243 | echo "include lowres/sw_lrp.def" > "${EXTRACTDIR}/sw.def" |
||
| 708 | leod | 244 | cp -pv lowres/sw_lrp.def "${EXTRACTDIR}/lowres/" |
| 384 | leod | 245 | cp -pv LRP.bat "${EXTRACTDIR}" |
| 246 | cp -pv LRP_Readme.txt "${EXTRACTDIR}" |
||
| 247 | cp -pv LRP_Changes.txt "${EXTRACTDIR}" |
||
| 330 | leod | 248 | echo "Copying skyboxes ..." |
| 384 | leod | 249 | tar_copy_dir "highres/skyboxes" "${EXTRACTDIR}/highres/skyboxes" |
| 330 | leod | 250 | cd "${WORKDIR}" |
| 251 | fi |
||
| 252 | |||
| 331 | leod | 253 | if [ "${HRPTYPE}" = "default" ] ; then |
| 254 | cp -pv "${DEF_TOP}" "${EXTRACTDIR}/${DEF_TOP}" |
||
| 255 | echo "\`*.txt' -> \`${EXTRACTDIR}/*.txt'" |
||
| 256 | cp -p *.txt "${EXTRACTDIR}" |
||
| 257 | fi |
||
| 258 | |||
| 320 | leod | 259 | } # copy_known_files() |
| 260 | |||
| 261 | |||
| 656 | leod | 262 | copy_polymost_mhk() |
| 320 | leod | 263 | { |
| 708 | leod | 264 | cp -p maphacks/3drealms/E?L*_polymost.mhk "${EXTRACTDIR}" |
| 265 | cp -p maphacks/dukedc/DUKEDC*-megaton.mhk "${EXTRACTDIR}" |
||
| 656 | leod | 266 | rm -f "${EXTRACTDIR}"/*_13d_*.mhk |
| 267 | # bashism: |
||
| 662 | leod | 268 | for i in "${EXTRACTDIR}"/*_polymost.mhk ; do mv "$i" "${i/_polymost}" ; done |
| 269 | for i in "${EXTRACTDIR}"/*-megaton.mhk ; do mv "$i" "${i/-megaton}" ; done |
||
| 656 | leod | 270 | } # copy_polymost_mhk() |
| 320 | leod | 271 | |
| 272 | |||
| 412 | leod | 273 | # I really don't know yet if this will become necessary, or if it does make |
| 324 | leod | 274 | # sense at all, but at least the files involved are listed. |
| 412 | leod | 275 | dukeplus_polymost_hrp_compatibility() |
| 320 | leod | 276 | { |
| 324 | leod | 277 | # dukeplus.def expects some files to be present in the HRP |
| 278 | # |
||
| 279 | # model "highres/sprites/characters/1405_duke.md3" { // all OK, no action required |
||
| 280 | # skin { pal 0 surface 0 file "highres/sprites/pickups/0057_jetpack.png" } |
||
| 281 | # skin { pal 0 surface 1 file "highres/sprites/characters/1405_duke.png" } |
||
| 282 | # skin { pal 10 surface 1 file "highres/sprites/characters/1405_duke_10.png" } |
||
| 283 | # skin { pal 11 surface 1 file "highres/sprites/characters/1405_duke_11.png" } |
||
| 284 | # skin { pal 12 surface 1 file "highres/sprites/characters/1405_duke_12.png" } |
||
| 285 | # skin { pal 13 surface 1 file "highres/sprites/characters/1405_duke_13.png" } |
||
| 286 | # skin { pal 14 surface 1 file "highres/sprites/characters/1405_duke_14.png" } |
||
| 287 | # skin { pal 15 surface 1 file "highres/sprites/characters/1405_duke_15.png" } |
||
| 288 | # skin { pal 16 surface 1 file "highres/sprites/characters/1405_duke_16.png" } |
||
| 289 | # skin { pal 21 surface 1 file "highres/sprites/characters/1405_duke_21.png" } |
||
| 290 | # skin { pal 23 surface 1 file "highres/sprites/characters/1405_duke_23.png" } |
||
| 291 | # skin { pal 0 surface 2 file "highres/sprites/pickups/0023_rpg.png" } |
||
| 292 | # |
||
| 293 | # model "highres/sprites/firstperson/2510_devastator.md3" { // since Imperium, not Eternity |
||
| 294 | # skin { pal 0 file "highres/sprites/firstperson/2510_devastator.png" specfactor 0.5 specpower 35 } |
||
| 295 | # specular { file "highres/sprites/firstperson/2510_devastator_s.png" } |
||
| 296 | # glow { file "highres/sprites/firstperson/2510_devastator_g.png" } |
||
| 297 | # |
||
| 298 | # model "highres/sprites/firstperson/2524_pistol.md3" { // most/mer : same MD3 + same skin til r295 |
||
| 299 | # skin { pal 0 file "highres/sprites/firstperson/2524_pistol.png" } // up to DP2.30 DNE/IMP only |
||
| 300 | # glow { file "highres/sprites/firstperson/2524_pistol_g.png" } // up to DP2.30 DNE/IMP only |
||
| 301 | # model "highres/sprites/firstperson/2530_clip.md3" { // most/mer : diff MD3, same skin |
||
| 302 | # skin { pal 0 file "highres/sprites/pickups/0040_pistolammo.jpg" } |
||
| 303 | # model "highres/sprites/firstperson/2532_cliphand.md3" { // most/mer : same MD3 + same skin til r295 |
||
| 304 | # skin { pal 0 file "highres/sprites/firstperson/2532_cliphand.png" } // til r295, then duke_hand_* |
||
| 305 | # |
||
| 320 | leod | 306 | |
| 324 | leod | 307 | SPR="highres/sprites" |
| 308 | SPRE="${EXTRACTDIR}/highres/sprites" |
||
| 309 | PATCHTYPE=$1 |
||
| 320 | leod | 310 | |
| 324 | leod | 311 | case "$PATCHTYPE" in |
| 312 | polymer) |
||
| 412 | leod | 313 | echo " # (Using \"Polymer approach\")" |
| 708 | leod | 314 | cp -pi $SPR/firstperson/2510_devastator.md3 "$SPRE/firstperson/" |
| 315 | cp -pi $SPR/firstperson/2510_devastator.png "$SPRE/firstperson/" |
||
| 316 | cp -pi $SPR/firstperson/2510_devastator_s.png "$SPRE/firstperson/" |
||
| 317 | cp -pi $SPR/firstperson/2510_devastator_g.png "$SPRE/firstperson/" |
||
| 318 | cp -pi $SPR/firstperson/2524_pistol.md3 "$SPRE/firstperson/" |
||
| 319 | cp -pi $SPR/firstperson_polymost/2524_pistol.png "$SPRE/firstperson/" |
||
| 320 | cp -pi $SPR/firstperson_polymost/2524_pistol_g.png "$SPRE/firstperson/" |
||
| 321 | cp -pi $SPR/firstperson/2530_clip.md3 "$SPRE/firstperson/" |
||
| 322 | cp -pi $SPR/pickups/0040_pistolammo.jpg "$SPRE/pickups/" |
||
| 323 | cp -pi $SPR/firstperson/2532_cliphand.md3 "$SPRE/firstperson/" |
||
| 324 | cp -pi $SPR/firstperson/2532_cliphand.png "$SPRE/firstperson/" |
||
| 325 | cp -pi $SPR/firstperson/duke_hand_d.png "$SPRE/firstperson/" |
||
| 326 | cp -pi $SPR/firstperson/duke_hand_n.png "$SPRE/firstperson/" |
||
| 327 | cp -pi $SPR/firstperson/duke_hand_s.png "$SPRE/firstperson/" |
||
| 324 | leod | 328 | ;; |
| 329 | polymost) |
||
| 412 | leod | 330 | echo " # (Using \"Polymost approach\")" |
| 708 | leod | 331 | #cp -pi $SPR/firstperson_polymost/2510_devastator.md3 "$SPRE/firstperson/" |
| 332 | #cp -pi $SPR/firstperson_polymost/2510_devastator.png "$SPRE/firstperson/" |
||
| 333 | ##cp -pi $SPR/firstperson/2510_devastator_s.png "$SPRE/firstperson/" |
||
| 334 | #cp -pi $SPR/firstperson_polymost/2510_devastator_g.png "$SPRE/firstperson/" |
||
| 335 | cp -pi $SPR/firstperson_polymost/2524_pistol.md3 "$SPRE/firstperson/" |
||
| 336 | #cp -pi $SPR/firstperson_polymost/2524_pistol.png "$SPRE/firstperson/" |
||
| 337 | #cp -pi $SPR/firstperson_polymost/2524_pistol_g.png "$SPRE/firstperson/" |
||
| 338 | #cp -pi $SPR/firstperson_polymost/2530_clip.md3 "$SPRE/firstperson/" |
||
| 339 | #cp -pi $SPR/pickups/0040_pistolammo.jpg "$SPRE/pickups/" |
||
| 340 | #cp -pi $SPR/firstperson_polymost/2532_cliphand.md3 "$SPRE/firstperson/" |
||
| 341 | #cp -pi $SPR/firstperson/2532_cliphand.png "$SPRE/firstperson/" |
||
| 342 | #cp -pi $SPR/firstperson/duke_hand_d.png "$SPRE/firstperson/" |
||
| 343 | #cp -pi $SPR/firstperson/duke_hand_n.png "$SPRE/firstperson/" |
||
| 344 | #cp -pi $SPR/firstperson/duke_hand_s.png "$SPRE/firstperson/" |
||
| 324 | leod | 345 | ;; |
| 346 | mixed) |
||
| 412 | leod | 347 | echo " # (Using \"Mixed approach\")" |
| 324 | leod | 348 | echo " # Not applied / Not yet implemented" |
| 349 | ;; |
||
| 350 | none) |
||
| 407 | leod | 351 | echo " Not applied" |
| 352 | #echo " # Not yet implemented" |
||
| 324 | leod | 353 | ;; |
| 354 | *) |
||
| 355 | echo " # Bad parameter" |
||
| 356 | ;; |
||
| 357 | esac |
||
| 358 | |||
| 412 | leod | 359 | } # dukeplus_polymost_hrp_compatibility() |
| 324 | leod | 360 | |
| 361 | |||
| 412 | leod | 362 | attrition_polymost_hrp_compatibility() |
| 363 | { |
||
| 364 | # attr_hrp.def expects some files to be present in the HRP |
||
| 365 | # |
||
| 366 | # model "highres/sprites/firstperson/2524_pistol.md3" { // most/mer : same MD3 + same skin til r295 |
||
| 367 | # skin { pal 0 file "highres/sprites/firstperson/2524_pistol.png" } // up to DP2.30 DNE/IMP only |
||
| 368 | # glow { file "highres/sprites/firstperson/2524_pistol_g.png" } // up to DP2.30 DNE/IMP only |
||
| 369 | |||
| 370 | SPR="highres/sprites" |
||
| 371 | SPRE="${EXTRACTDIR}/highres/sprites" |
||
| 372 | PATCHTYPE=$1 |
||
| 373 | |||
| 374 | case "$PATCHTYPE" in |
||
| 375 | polymer) |
||
| 376 | echo " # (Using \"Polymer approach\")" |
||
| 377 | ;; |
||
| 378 | polymost) |
||
| 379 | echo " # (Using \"Polymost approach\")" |
||
| 708 | leod | 380 | cp -piu $SPR/firstperson_polymost/2524_pistol.md3 "$SPRE/firstperson/" |
| 381 | cp -pi $SPR/firstperson_polymost/2524_pistol.png "$SPRE/firstperson/" |
||
| 382 | cp -pi $SPR/firstperson_polymost/2524_pistol_g.png "$SPRE/firstperson/" |
||
| 383 | cp -pi $SPR/firstperson/2530_clip.md3 "$SPRE/firstperson/" |
||
| 384 | #cp -pi $SPR/firstperson/2532_cliphand.md3 "$SPRE/firstperson/" |
||
| 385 | ##cp -pi $SPR/firstperson/2532_cliphand.png "$SPRE/firstperson/" |
||
| 412 | leod | 386 | #cp -pi $SPR/firstperson/duke_hand_d.png "$SPRE/firstperson/2532_cliphand.png" |
| 387 | ;; |
||
| 388 | mixed) |
||
| 389 | echo " # (Using \"Mixed approach\")" |
||
| 708 | leod | 390 | cp -piu $SPR/firstperson_polymost/2524_pistol.md3 "$SPRE/firstperson/" |
| 391 | cp -pi $SPR/firstperson_polymost/2524_pistol.png "$SPRE/firstperson/" |
||
| 392 | cp -pi $SPR/firstperson_polymost/2524_pistol_g.png "$SPRE/firstperson/" |
||
| 393 | cp -pi $SPR/firstperson/2530_clip.md3 "$SPRE/firstperson/" |
||
| 394 | #cp -pi $SPR/firstperson/2532_cliphand.md3 "$SPRE/firstperson/" |
||
| 395 | ##cp -pi $SPR/firstperson/2532_cliphand.png "$SPRE/firstperson/" |
||
| 412 | leod | 396 | #cp -pi $SPR/firstperson/duke_hand_d.png "$SPRE/firstperson/2532_cliphand.png" |
| 708 | leod | 397 | cp -pi $SPR/firstperson/2544_rpg.md3 "$SPRE/firstperson/" |
| 412 | leod | 398 | cp -pi $SPR/firstperson/2544_rpg_d.png "$SPRE/firstperson/2544_rpg.png" |
| 708 | leod | 399 | cp -pi $SPR/firstperson/2544_rpg_n.png "$SPRE/firstperson/" |
| 400 | cp -pi $SPR/firstperson/2544_rpg_s.png "$SPRE/firstperson/" |
||
| 401 | cp -pi $SPR/firstperson/duke_hand_d.png "$SPRE/firstperson/" |
||
| 402 | cp -pi $SPR/firstperson/duke_hand_n.png "$SPRE/firstperson/" |
||
| 403 | cp -pi $SPR/firstperson/duke_hand_s.png "$SPRE/firstperson/" |
||
| 404 | cp -pi $SPR/firstperson/muzzle_flash_01.png "$SPRE/firstperson/" |
||
| 412 | leod | 405 | cp -pi highres/common/transp.png "${EXTRACTDIR}/highres/common" |
| 406 | ;; |
||
| 407 | none) |
||
| 408 | echo " Not applied" |
||
| 409 | #echo " # Not yet implemented" |
||
| 410 | ;; |
||
| 411 | *) |
||
| 412 | echo " # Bad parameter" |
||
| 413 | ;; |
||
| 414 | esac |
||
| 415 | |||
| 416 | } # attrition_polymost_hrp_compatibility() |
||
| 417 | |||
| 418 | |||
| 320 | leod | 419 | parse_defs() |
| 420 | { |
||
| 421 | echo "$1" |
||
| 324 | leod | 422 | BLOCK_COMMENT="OFF" |
| 320 | leod | 423 | cat $1 | while read DEF_LINE; do |
| 424 | |||
| 425 | #DOS only: DEF_FILE=`echo "${DEF_LINE}" | grep -wE "^include" | sed s/include\ //` |
||
| 415 | leod | 426 | #DEF_FILE=`echo "${DEF_LINE}" | grep -wE "^include" | sed s/include\ // | sed s/\\\r//` |
| 506 | leod | 427 | # DEF_FILE=`echo "${DEF_LINE}" | grep -wE "^include" | sed s/include\ // | sed s/\\\/\\\/.*// | sed s/\\\r//` |
| 428 | DEF_FILE=`echo "${DEF_LINE}" | grep -wE "^include" | awk '{ print $2 }' | sed 's/\r//'` |
||
| 320 | leod | 429 | if [ "${DEF_FILE}" != "" ] ; then |
| 430 | cp -p "${DEF_FILE}" "${EXTRACTDIR}/${DEF_FILE}" |
||
| 431 | parse_defs "${DEF_FILE}" |
||
| 432 | fi |
||
| 433 | |||
| 375 | leod | 434 | #HRP_TERM=`echo "${DEF_LINE}" | grep -owE "file|model|voxel|front|right|back|left|top|bottom|down"` |
| 435 | ## Old style added (except "defineskybox"): |
||
| 415 | leod | 436 | HRP_TERM=`echo "${DEF_LINE}" | grep -owE "definetexture|definemodel|definemodelskin|file|mhkfile|model|voxel|front|right|back|left|top|bottom|down"` |
| 333 | leod | 437 | #More skybox tokens: tile, pal, ft|rt|bk|lf|up|dn|forward|lt|ceiling|floor|ceil |
| 320 | leod | 438 | |
| 324 | leod | 439 | if [ ! "$EXTRACT_COMMENTED_FILES" = "YES" ] ; then |
| 440 | |||
| 441 | COMMENT_TERM=`echo "${DEF_LINE}" | grep -oE "\\/\\*|\\*\\/"` |
||
| 442 | if [ "$COMMENT_TERM" = "/*" ] ; then BLOCK_COMMENT="ON" ; fi |
||
| 443 | |||
| 444 | if [ "$BLOCK_COMMENT" = "ON" ] ; then HRP_TERM="" ; fi |
||
| 445 | |||
| 446 | if [ "$COMMENT_TERM" = "*/" ] ; then BLOCK_COMMENT="OFF" ; fi |
||
| 447 | |||
| 448 | if [ ! "$HRP_TERM" = "" ] ; then |
||
| 449 | HRP_COMMENT=`echo "${DEF_LINE}" | grep -E "//.*$HRP_TERM"` |
||
| 450 | if [ ! "$HRP_COMMENT" = "" ] ; then |
||
| 451 | HRP_TERM="" |
||
| 452 | fi |
||
| 453 | fi |
||
| 454 | |||
| 455 | fi |
||
| 456 | |||
| 320 | leod | 457 | case "$HRP_TERM" in |
| 415 | leod | 458 | file|mhkfile) |
| 320 | leod | 459 | #HRP_FILE=`echo "${DEF_LINE}" | sed -r s/^.*file\ *\"//g | sed s/\".*//` |
| 460 | # Mastering the backslash :-) ... hm, no big performance gain ... : |
||
| 461 | HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*file\\ *\"\\)\\([^\"]*\\)\\(.*\\)/\\\2/` |
||
| 462 | # Ignore comments WIP: |
||
| 463 | #HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*file\\ *\\)\\(\\"\\(.*\\)\\"\\)\\(.*\\)/\\\3/` |
||
| 464 | ;; |
||
| 331 | leod | 465 | model|voxel) |
| 466 | HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*${HRP_TERM}\\ *\"\\)\\([^\"]*\\)\\(.*\\)/\\\2/` |
||
| 320 | leod | 467 | ;; |
| 333 | leod | 468 | front|right|back|left|top|bottom|down) |
| 320 | leod | 469 | #HRP_FILE=`echo "${DEF_LINE}" | sed -r s/^.*${HRP_TERM}\ *\"//g | sed s/\".*//` |
| 470 | HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*${HRP_TERM}\\ *\"\\)\\([^\"]*\\)\\(.*\\)/\\\2/` |
||
| 471 | ;; |
||
| 375 | leod | 472 | ## Old Style |
| 473 | definemodel) |
||
| 474 | HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*${HRP_TERM}\\ *\"\\)\\([^\"]*\\)\\(.*\\)/\\\2/` |
||
| 475 | ;; |
||
| 476 | definemodelskin) |
||
| 477 | HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(^.*${HRP_TERM}\\ 0\\ \"\\)\\([^\"]*\\)\\(.*\\)/\\\2/` |
||
| 478 | ;; |
||
| 479 | definetexture) |
||
| 480 | # Won't work atm if filename in quotes (too lazy) |
||
| 481 | #HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(\\.*\\)\\(\\ \\)\\(.*\\)\\($\\)/\\\3/` |
||
| 482 | HRP_FILE=`echo "${DEF_LINE}" | sed -r --posix s/\\(\\.*\\)\\(\\ \\)\\([0-9a-zA-Z\\_\\/\\.]*\\)\\(.*\\)/\\\3/` |
||
| 483 | #echo "DEF_LINE : ${DEF_LINE}" |
||
| 484 | #echo "HRP_FILE : ${HRP_FILE}" |
||
| 485 | ;; |
||
| 320 | leod | 486 | *) |
| 487 | HRP_FILE="" |
||
| 488 | ;; |
||
| 489 | esac |
||
| 490 | |||
| 491 | if [ ! "${HRP_FILE}" = "" ] ; then |
||
| 492 | if [ -f "${HRP_FILE}" ] ; then |
||
| 493 | cp -p "${HRP_FILE}" "${EXTRACTDIR}/${HRP_FILE}" |
||
| 494 | else |
||
| 495 | echo "WARNING : ${HRP_FILE} is missing!" |
||
| 496 | fi |
||
| 497 | fi |
||
| 498 | |||
| 499 | done |
||
| 500 | } # parse_defs() |
||
| 501 | |||
| 502 | |||
| 503 | delete_empty_folders() |
||
| 504 | { |
||
| 505 | if [ -d "${EXTRACTDIR}" ] ; then |
||
| 506 | rm -rf ${EXTRACTDIR}/.svn |
||
| 507 | DIRLIST=./EXTRACT_DIRECTORIES.lst |
||
| 508 | du "${EXTRACTDIR}" > ${DIRLIST} |
||
| 509 | cat ${DIRLIST} | while read DIR ; do |
||
| 510 | if [ "0" = "`echo \"${DIR}\" | grep -owE \"0\"`" ] ; then |
||
| 511 | EMPTYDIR="`echo \"${DIR}\" | sed -r --posix s/0//`" |
||
| 645 | leod | 512 | if [ -d ${EMPTYDIR} ] ; then |
| 513 | rmdir --parents --ignore-fail-on-non-empty ${EMPTYDIR} |
||
| 320 | leod | 514 | fi |
| 515 | fi |
||
| 516 | done |
||
| 517 | rm ${DIRLIST} |
||
| 518 | else |
||
| 519 | echo "No ${EXTRACTDIR}." |
||
| 520 | fi |
||
| 521 | } # delete_empty_folders() |
||
| 522 | |||
| 523 | |||
| 524 | main() |
||
| 525 | { |
||
| 526 | EXTRACTDIR=../hrp_${HRPTYPE}_extract |
||
| 527 | echo "EXTRACT :" ${HRPROOT}/${EXTRACTDIR} |
||
| 528 | |||
| 529 | if [ $FORCE = 0 ] ; then |
||
| 530 | if ask "Proceed?" |
||
| 531 | then echo "Extracting ${HRPTYPE} from \"${HRPROOT}\" " |
||
| 532 | else exit 0 |
||
| 533 | fi |
||
| 534 | fi |
||
| 535 | |||
| 536 | date +%F" "%H:%M:%S |
||
| 537 | |||
| 538 | echo "### Deleting ${EXTRACTDIR} ... ###" |
||
| 539 | rm -rf ${EXTRACTDIR} |
||
| 540 | |||
| 541 | echo "### Copying directory tree ... ###" |
||
| 542 | copy_folders |
||
| 543 | |||
| 643 | leod | 544 | if [ "${HRPTYPE}" = "polymost" ] || [ "${HRPTYPE}" = "polymost_override" ] ||\ |
| 639 | leod | 545 | [ "${HRPTYPE}" = "megaton" ] || [ "${HRPTYPE}" = "megaton_override" ] ; then |
| 320 | leod | 546 | |
| 408 | leod | 547 | echo "### DukePlus<>Polymost HRP compatibility patch ... ###" |
| 412 | leod | 548 | dukeplus_polymost_hrp_compatibility $DUKEPLUS_POLYMOST_COMPATIBILTY_APPROACH |
| 549 | |||
| 550 | echo "### Attrition<>Polymost HRP compatibility patch ... ###" |
||
| 551 | attrition_polymost_hrp_compatibility $ATTRITION_POLYMOST_COMPATIBILTY_APPROACH |
||
| 320 | leod | 552 | fi |
| 553 | |||
| 660 | leod | 554 | |
| 661 | leod | 555 | if [ "${HRPTYPE}" = "polymost" ]||[ "${HRPTYPE}" = "polymost_override" ]; then |
| 556 | # Some people prefer unusual setups ... |
||
| 557 | zip -rq9 ${EXTRACTDIR}/polymost_hrp_polymer_maphacks.zip \ |
||
| 558 | maphacks/3drealms/*.mhk |
||
| 559 | fi |
||
| 560 | |||
| 660 | leod | 561 | if [ "${HRPTYPE}" = "megaton" ] || [ "${HRPTYPE}" = "megaton_override" ]; then |
| 661 | leod | 562 | echo "### Copying maphacks for Megaton ... ###" |
| 660 | leod | 563 | copy_polymost_mhk |
| 564 | fi |
||
| 565 | |||
| 320 | leod | 566 | echo "### Parsing DEF file hierarchy ... ###" |
| 324 | leod | 567 | if [ "$EXTRACT_COMMENTED_FILES" = "YES" ] ; then |
| 568 | echo " # Extract commented textures and models: $EXTRACT_COMMENTED_FILES" |
||
| 569 | else |
||
| 570 | echo " # Extract commented textures and models: NO" |
||
| 571 | fi |
||
| 645 | leod | 572 | if [ "${HRPTYPE}" = "megaton" ] || [ "${HRPTYPE}" = "full" ] ; then |
| 573 | parse_defs duke3d_hrp_megaton.def |
||
| 574 | fi |
||
| 320 | leod | 575 | if [ "${HRPTYPE}" = "polymost" ] || [ "${HRPTYPE}" = "full" ] ; then |
| 576 | parse_defs duke3d_hrp_polymost.def |
||
| 577 | fi |
||
| 645 | leod | 578 | if [ "${HRPTYPE}" = "polymer" ] || [ "${HRPTYPE}" = "full" ] ; then |
| 320 | leod | 579 | parse_defs duke3d_hrp.def |
| 580 | fi |
||
| 330 | leod | 581 | if [ "${HRPTYPE}" = "voxel" ] ; then |
| 582 | parse_defs duke3d_voxel.def |
||
| 583 | fi |
||
| 584 | if [ "${HRPTYPE}" = "sw_highres" ] ; then |
||
| 333 | leod | 585 | parse_defs highres/sw_hrp.def |
| 330 | leod | 586 | fi |
| 587 | if [ "${HRPTYPE}" = "sw_lowres" ] ; then |
||
| 333 | leod | 588 | parse_defs lowres/sw_lrp.def |
| 330 | leod | 589 | fi |
| 708 | leod | 590 | if [ "${HRPTYPE}" = "maphacks" ] ; then |
| 591 | parse_defs maphacks/mhk-extract.def |
||
| 592 | fi |
||
| 331 | leod | 593 | if [ "${HRPTYPE}" = "default" ] ; then |
| 594 | parse_defs "${DEF_TOP}" |
||
| 595 | fi |
||
| 320 | leod | 596 | |
| 656 | leod | 597 | echo "### Copying 'known' files ... ###" |
| 598 | copy_known_files |
||
| 599 | |||
| 320 | leod | 600 | echo "### Deleting empty directories in ${EXTRACTDIR} ... ###" |
| 601 | delete_empty_folders |
||
| 602 | |||
| 603 | date +%F" "%H:%M:%S |
||
| 604 | |||
| 605 | echo "Command line example for creating a ZIP package:" |
||
| 675 | leod | 606 | echo "sh -c \"cd ${EXTRACTDIR}; zip -9rqn .jpg:.png:.zip ${EXTRACTDIR}.zip\ |
| 607 | highpal highres maphacks *.def *.txt\"" |
||
| 320 | leod | 608 | } # main() |
| 609 | |||
| 610 | |||
| 611 | |||
| 612 | PRGPATH=$0 |
||
| 613 | HRPTYPE=$1 |
||
| 614 | if [ "$2" = "y" ] ; then FORCE=1 ; else FORCE=0 ; fi |
||
| 325 | leod | 615 | if [ "$2" = "v" ] && [ ! "$3" = "" ] ; then |
| 616 | VERSION="$3" |
||
| 617 | echo "${VERSION}" > VERSION |
||
| 618 | fi |
||
| 320 | leod | 619 | HRPROOT=. |
| 330 | leod | 620 | WORKDIR=`pwd` |
| 320 | leod | 621 | |
| 622 | cd "${HRPROOT}" |
||
| 330 | leod | 623 | echo "PWD : ${WORKDIR}" |
| 624 | echo "HRPROOT : ${HRPROOT}" |
||
| 320 | leod | 625 | |
| 626 | case "$HRPTYPE" in |
||
| 708 | leod | 627 | polymer|polymost_override|polymost|megaton_override|megaton|maphacks) |
| 320 | leod | 628 | main $HRPTYPE |
| 629 | ;; |
||
| 630 | full) |
||
| 639 | leod | 631 | if [ $FORCE = 0 ] ; then if ask "Extract full HRP (+ Override Packs)?" |
| 320 | leod | 632 | then echo "Extracting ${HRPTYPE} from \"${HRPROOT}\" " |
| 633 | else exit 0 |
||
| 634 | fi ; fi |
||
| 635 | ${PRGPATH} polymost_override y |
||
| 708 | leod | 636 | ${PRGPATH} megaton_override y |
| 320 | leod | 637 | main $HRPTYPE |
| 638 | ;; |
||
| 639 | both) |
||
| 640 | if [ $FORCE = 0 ] ; then if ask "Extract both pure HRP?" |
||
| 641 | then echo "Extracting ${HRPTYPE} from \"${HRPROOT}\" " |
||
| 642 | else exit 0 |
||
| 643 | fi ; fi |
||
| 644 | ${PRGPATH} polymer y |
||
| 645 | ${PRGPATH} polymost y |
||
| 646 | ;; |
||
| 639 | leod | 647 | ovr) |
| 648 | ${PRGPATH} polymost_override y |
||
| 708 | leod | 649 | ${PRGPATH} megaton_override y |
| 639 | leod | 650 | ;; |
| 320 | leod | 651 | all) |
| 652 | if [ $FORCE = 0 ] ; then if ask "Extract all packs from the repository?" |
||
| 653 | then echo "Extracting ${HRPTYPE} from \"${HRPROOT}\" " |
||
| 654 | else exit 0 |
||
| 655 | fi ; fi |
||
| 708 | leod | 656 | ${PRGPATH} both y |
| 657 | ${PRGPATH} megaton y |
||
| 658 | ${PRGPATH} maphacks y |
||
| 659 | ${PRGPATH} full y |
||
| 320 | leod | 660 | ;; |
| 330 | leod | 661 | voxel) |
| 662 | SET_VERSION=NO |
||
| 663 | main $HRPTYPE |
||
| 664 | ;; |
||
| 665 | sw_highres|sw_lowres) |
||
| 666 | SET_VERSION=NO |
||
| 667 | main $HRPTYPE |
||
| 668 | ;; |
||
| 669 | sw_both) |
||
| 670 | if [ $FORCE = 0 ] ; then if ask "Extract both Shadow Warrior HRP/LRP?" |
||
| 671 | then echo "Extracting ${HRPTYPE} from \"${HRPROOT}\" " |
||
| 672 | else exit 0 |
||
| 673 | fi ; fi |
||
| 674 | ${PRGPATH} sw_lowres y |
||
| 675 | ${PRGPATH} sw_highres y |
||
| 676 | ;; |
||
| 320 | leod | 677 | unused) |
| 678 | echo "Option \"$1\" not yet implemented." |
||
| 679 | ;; |
||
| 680 | debug) |
||
| 681 | echo "Nothing to debug." |
||
| 682 | ;; |
||
| 683 | *) |
||
| 408 | leod | 684 | if [ -f "${HRPTYPE}" ] && [ "${HRPTYPE##*.}" = "def" ] ; then |
| 685 | DEF_TOP="${HRPTYPE}" |
||
| 331 | leod | 686 | HRPTYPE=default |
| 687 | SET_VERSION=NO |
||
| 688 | EXTRACT_COMMENTED_FILES=NO |
||
| 689 | main $HRPTYPE |
||
| 690 | else |
||
| 408 | leod | 691 | echo "Usage: ${0} {HRPTYPE|TOP_DEF_FILE} [v VERSION]" |
| 639 | leod | 692 | echo "HRPTYPEs: {full|ovr|all}" |
| 693 | echo "HRPTYPEs: {polymer|polymost_override|polymost|both}" |
||
| 694 | echo "HRPTYPEs: {megaton_override|megaton}" |
||
| 708 | leod | 695 | echo "HRPTYPEs: {maphacks}" |
| 331 | leod | 696 | echo "HRPTYPEs: {sw_highres|sw_lowres|sw_both}" |
| 697 | exit 1 |
||
| 698 | fi |
||
| 320 | leod | 699 | ;; |
| 700 | esac |
||
| 701 | |||
| 702 | exit 0 |