Rev 714 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 714 | Rev 715 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #!/bin/bash |
1 | #!/bin/bash |
2 | 2 | ||
3 | # Duke Nukem 3D CON/DEF/HRP File Extractor v0.9.2 2020-02-21 |
3 | # Duke Nukem 3D CON/DEF/HRP File Extractor v0.9.3 2020-03-21 |
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 85... | Line 85... | ||
85 | 85 | ||
86 | case "${VER_FILE}" in |
86 | case "${VER_FILE}" in |
87 | hrp_readme.txt) |
87 | hrp_readme.txt) |
88 | cat "${VER_FILE}" | sed -r --posix \ |
88 | cat "${VER_FILE}" | sed -r --posix \ |
89 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)\(\\\)\)\(.*\)/\\1${VERSION}\ \(${V_DATE}\)\ \ \\5/ \ |
89 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)\(\\\)\)\(.*\)/\\1${VERSION}\ \(${V_DATE}\)\ \ \\5/ \ |
90 | >> "${TARGET_FILE}" |
90 | > "${TARGET_FILE}" |
91 | ;; |
91 | ;; |
92 | duke3d_hrp.def) |
92 | duke3d_hrp.def) |
93 | if [ "${HRPTYPE}" = "polymer" ] ; then |
93 | if [ "${HRPTYPE}" = "polymer" ] ; then |
94 | cat "${VER_FILE}" | sed -r --posix \ |
94 | cat "${VER_FILE}" | sed -r --posix \ |
95 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)/\\1${VERSION}\ Polymer\\3/ \ |
95 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)/\\1${VERSION}\ Polymer\\3/ \ |
96 | >> "${TARGET_FILE}" |
96 | > "${TARGET_FILE}" |
97 | else |
97 | else |
98 | cat "${VER_FILE}" | sed -r --posix \ |
98 | cat "${VER_FILE}" | sed -r --posix \ |
99 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)/\\1${VERSION}\\3/ \ |
99 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)/\\1${VERSION}\\3/ \ |
100 | >> "${TARGET_FILE}" |
100 | > "${TARGET_FILE}" |
101 | fi |
101 | fi |
102 | ;; |
102 | ;; |
103 | duke3d_hrp_polymost.def | \ |
103 | duke3d_hrp_polymost.def | \ |
104 | tools/polymost_override/duke3d_hrp_polymost_override.def | \ |
104 | tools/polymost_override/duke3d_hrp_polymost_override.def | \ |
105 | duke3d_hrp_megaton.def | \ |
105 | duke3d_hrp_megaton.def | \ |
106 | tools/megaton_override/duke3d_hrp_megaton_override.def | \ |
106 | tools/megaton_override/duke3d_hrp_megaton_override.def | \ |
107 | duke3d_maphacks.def ) |
107 | duke3d_maphacks.def ) |
108 | cat "${VER_FILE}" | sed -r --posix \ |
108 | cat "${VER_FILE}" | sed -r --posix \ |
109 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)/\\1${VERSION}\\3/ \ |
109 | s/\(Version\ *\)\([0-9\.]*\)\(.*\)/\\1${VERSION}\\3/ \ |
110 | >> "${TARGET_FILE}" |
110 | > "${TARGET_FILE}" |
111 | ;; |
111 | ;; |
112 | *) |
112 | *) |
113 | exit_on_error "copy_set_version() - UNKNOWN FILE: ${VER_FILE}" |
113 | exit_on_error "copy_set_version() - UNKNOWN FILE: ${VER_FILE}" |
114 | ;; |
114 | ;; |
115 | esac |
115 | esac |
Line 906... | Line 906... | ||
906 | then echo "Extracting ${HRPTYPE} from \"${HRPROOT}\" " |
906 | then echo "Extracting ${HRPTYPE} from \"${HRPROOT}\" " |
907 | else exit 0 |
907 | else exit 0 |
908 | fi ; fi |
908 | fi ; fi |
909 | ${PRGPATH} polymost_override y |
909 | ${PRGPATH} polymost_override y |
910 | ${PRGPATH} megaton_override y |
910 | ${PRGPATH} megaton_override y |
- | 911 | FORCE=1 |
|
911 | main $HRPTYPE |
912 | main $HRPTYPE |
912 | ;; |
913 | ;; |
913 | both) |
914 | both) |
914 | if [ $FORCE = 0 ] ; then if ask "Extract both pure HRP?" |
915 | if [ $FORCE = 0 ] ; then if ask "Extract both pure HRP?" |
915 | then echo "Extracting ${HRPTYPE} from \"${HRPROOT}\" " |
916 | then echo "Extracting ${HRPTYPE} from \"${HRPROOT}\" " |