home *** CD-ROM | disk | FTP | other *** search
- . $VER: HipPack 1.0a © 1996 Jari Karjalainen 060196
- .key Pakkaus,Työhakemisto
- .bra {
- .ket }
- .def Pakkaus eiPakkaus
- .def Työhakemisto t:
- if not "{Pakkaus}" eq eiPakkaus
- setenv pakkausformaatti "{Pakkaus}"
- if exists "{Työhakemisto}"
- cd "{Työhakemisto}"
- else
- cd t:
- endif
- if not exists tmpdir
- makedir tmpdir
- endif
- failat 21
- search >nil: env:pakkausformaatti .lha
- if not warn
- lha -q x "{Pakkaus}" tmpdir/
- else
- search >nil: env:pakkausformaatti .zip
- if not warn
- unzip -q "{Pakkaus}" -d tmpdir/
- else
- search >nil: env:pakkausformaatti .lzx
- if not warn
- lzx -q1 x "{Pakkaus}" tmpdir/
- else
- search >nil: env:pakkausformaatti .arj
- if not warn
- cd tmpdir
- unarj >nil: x "{pakkaus}"
- cd /
- else
- search >nil: env:pakkausformaatti (#?.mod|mod.#?|#?.med|#?.s3m|#?.xm) pattern
- if not warn
- hip "{Pakkaus}"
- endif
- endif
- endif
- endif
- endif
- hip `list tmpdir/(#?.mod|mod.#?|#?.s3m|#?.xm|#?.med) lformat "*"%p%n*""`
- waithip
- delete >nil: tmpdir all
- else
- set file `requestfile title="Valitse pakkaus/modi..." acceptpattern="(#?.lha|#?.lzx|#?.zip|#?.arj|#?.mod|mod.#?|#?.s3m|#?.xm|#?.med)" positive=Valittu negative=Peruutus`
- execute s:hippack "$file"
- endif
- lab end
- unsetenv pakkausformaatti
- unset file
-