Subversion Repositories duke3d_hrp

Rev

Rev 710 | Rev 714 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 710 Rev 711
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
# Duke Nukem 3D CON/DEF/HRP File Extractor  v0.9.0  2019-05-27
3
# Duke Nukem 3D CON/DEF/HRP File Extractor  v0.9.1  2019-09-17
4
#
4
#
5
# Author:  LeoD
5
# Author:  LeoD
6
# License: ISC License -> https://opensource.org/licenses/isc-license.txt
6
# License: ISC License -> https://opensource.org/licenses/isc-license.txt
7
#
7
#
8
# This script extracts a working copy of your local Duke Nukem 3D High
8
# This script extracts a working copy of your local Duke Nukem 3D High
Line 234... Line 234...
234
  if [ "${HRPTYPE}" = "voxels" ] ; then
234
  if [ "${HRPTYPE}" = "voxels" ] ; then
235
    cp -pv voxelpack_readme.txt      "${EXTRACTDIR}"
235
    cp -pv voxelpack_readme.txt      "${EXTRACTDIR}"
236
    cp -pv voxelpack_art_license.txt "${EXTRACTDIR}"
236
    cp -pv voxelpack_art_license.txt "${EXTRACTDIR}"
237
    cp -pv duke3d.def                "${EXTRACTDIR}"
237
    cp -pv duke3d.def                "${EXTRACTDIR}"
238
    cp -pv duke3d_voxels.def         "${EXTRACTDIR}"
238
    cp -pv duke3d_voxels.def         "${EXTRACTDIR}"
-
 
239
    cp -pv dukegdx.def               "${EXTRACTDIR}"
-
 
240
    cp -pv voxels/pickups_gdx.def    "${EXTRACTDIR}/voxels/"
-
 
241
    cp -pv eduke.con                 "${EXTRACTDIR}"
-
 
242
    if [ -d  scripts/ ] ; then
-
 
243
      cp -pv scripts/*.con           "${EXTRACTDIR}/scripts/"
-
 
244
    fi
-
 
245
    ### LeoD ###
239
    if [ -f  EDUKE.CON ] ; then
246
    if [ -f  EDUKE.CON ] ; then
240
      cp -pv EDUKE.CON               "${EXTRACTDIR}"
247
      cp -pv EDUKE.CON               "${EXTRACTDIR}"
-
 
248
    fi
-
 
249
    if [ -d   voxels/scripts/ ] ; then
-
 
250
      #cp -pv voxels/scripts/freezeammo.con "${EXTRACTDIR}/voxels/scripts/"
-
 
251
      #cp -pv voxels/scripts/holoduke.con   "${EXTRACTDIR}/voxels/scripts/"
241
      #cp -pv scripts/animation.con   "${EXTRACTDIR}/scripts/"
252
      #cp -pv voxels/scripts/pigtank.con    "${EXTRACTDIR}/voxels/scripts/"
242
      #cp -pv scripts/rotation.con    "${EXTRACTDIR}/scripts/"
253
      #cp -pv voxels/scripts/rotation.con   "${EXTRACTDIR}/voxels/scripts/"
243
      cp -pv scripts/*.con           "${EXTRACTDIR}/scripts/"
254
      cp  -pv voxels/scripts/*.con          "${EXTRACTDIR}/voxels/scripts/"
244
    fi
255
    fi
245
  fi
256
  fi
246
 
257
 
247
  if [ "${HRPTYPE}" = "sw_highres" ] ; then
258
  if [ "${HRPTYPE}" = "sw_highres" ] ; then
248
    cp -pv sw.def                   "${EXTRACTDIR}"
259
    cp -pv sw.def                   "${EXTRACTDIR}"
Line 665... Line 676...
665
 
676
 
666
 
677
 
667
delete_empty_folders() {
678
delete_empty_folders() {
668
  if [ -d "${EXTRACTDIR}" ] ; then
679
  if [  -d "${EXTRACTDIR}" ] ; then
669
    rm -rf ${EXTRACTDIR}/.svn
680
    rm -rf  ${EXTRACTDIR}/.svn
670
    DIRLIST=./EXTRACT_DIRECTORIES.lst
681
    DIRLIST=${EXTRACTDIR}/EXTRACT_DIRECTORIES.lst
671
    du "${EXTRACTDIR}" > ${DIRLIST}
682
    du     "${EXTRACTDIR}" > ${DIRLIST}
672
    cat ${DIRLIST} | while read DIR ; do
683
    cat ${DIRLIST} | while read DIR ; do
673
      if [ "0" = "`echo \"${DIR}\" | grep -owE \"0\"`" ] ; then
684
      if [ "0" = "`echo \"${DIR}\" | grep -owE \"0\"`" ] ; then
674
        EMPTYDIR="`echo \"${DIR}\" | sed -r --posix s/0//`"
685
        EMPTYDIR="`echo \"${DIR}\" | sed -r --posix s/0//`"
675
        if [ -d ${EMPTYDIR} ] ; then
686
        if [ -d ${EMPTYDIR} ] ; then