Changeset 736

Show
Ignore:
Timestamp:
02/27/08 02:30:21 (5 months ago)
Author:
takkaria
Message:

Make the pkg_win script a bit nicer.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/scripts/pkg_win

    r529 r736  
    11#!/bin/bash 
    2 
    3 # Simple packaging file for the Windows port.  Only really useful when 
    4 # cross-compiling, or using Cygwin.  Originally by Robert Ruehlmann. 
    5 
    6 # Requires you have UPX (http://upx.sf.net/) installed. 
    7 
    8 # Use in the root directory of the game, like so: 
    9 #   scripts/pkg_win <name of of release, e.g. angband-3.4.6> 
    10 
     2 
     3if [ $# -ne 1 ] && [ $# -ne 2 ]; then 
     4        echo "Simple packaging file for the Windows port.  Only really useful when" 
     5        echo "cross-compiling, or using Cygwin.  Originally by Robert Ruehlmann." 
     6        echo "" 
     7        echo "Requires you have UPX (http://upx.sf.net/) installed." 
     8        echo "" 
     9        echo "Use in the root directory of the game, like so:" 
     10        echo "   scripts/pkg_win <name of of release, e.g. angband-4.0.1> [<output filename>]" 
     11        echo "" 
     12 
     13        exit 1 
     14fi 
     15 
    1116DIR=$1 
     17if [ $# -eq 1 ]; then 
     18        OUT=$1.zip 
     19else 
     20        OUT=$2 
     21fi 
    1222 
     23             
    1324function cp_unix2dos { 
    1425  # Just in case they're already DOS_format, we strip them to UNIX first. :) 
     
    1728 
    1829 
    19 mkdir $DIR 
     30mkdir -p $DIR 
    2031cd $DIR 
    2132 
     
    7081 
    7182cd .. 
    72  
    73 zip -9 -r $1.zip $1 
    74  
    75 rm -rf $1 
     83zip -9 -r $OUT $DIR 
     84rm -rf $DIR