From f952a3e588c1de28142c7ea7d657c13662b161e1 Mon Sep 17 00:00:00 2001 From: anmaster Date: Sun, 15 Feb 2009 15:37:56 +0000 Subject: [PATCH] Fix some bugs in the pshop_copier script for the brest pshops. git-svn-id: svn://svn.code.sf.net/p/crossfire/code/maps/trunk@11538 282e977c-c81d-0410-88c4-b93c2d0d6712 --- brest/pshops/pshop_copier | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/brest/pshops/pshop_copier b/brest/pshops/pshop_copier index 4dcb9a358..d93661d56 100755 --- a/brest/pshops/pshop_copier +++ b/brest/pshops/pshop_copier @@ -24,17 +24,17 @@ for FILE in pshop*; do #go there cd $FILE + #get the pshopnum + PSHOPNUM=$(cut -d p -f3 <<< "$FILE") + #for each file in the pshop directory for MYFILE in *; do #correct the key values on inventory checkers - sed "s/pshop1/${FILE}/" "$MYFILE" > "${MYFILE}_2" + sed "s/pshop1/${FILE}/;s/^name Private Shop 1,/name Private Shop ${PSHOPNUM},/" "$MYFILE" > "${MYFILE}_2" rm -f $MYFILE mv "${MYFILE}_2" $MYFILE done - #get the pshopnum - PSHOPNUM=$(cut -d p -f3 <<< "$FILE") - #calculate HP and SP based on pshopnum if [[ $PSHOPNUM -lt 14 ]]; then #top row of shops @@ -77,7 +77,7 @@ for FILE in pshop*; do ;; esac if [[ ( $hadhp == 1 ) && ( $hadsp == 1 ) ]]; then - state=1 + state=0 fi ;; esac