several fixups

This commit is contained in:
Christopher Roy Bratusek 2014-05-13 18:20:28 +02:00
parent 002890c54a
commit 77a9b814c7
2 changed files with 9 additions and 17 deletions

View File

@ -6,24 +6,16 @@
# #
# License: GPL v3 # License: GPL v3
if [[ ! -d ${PWD}/workdir ]]; then
mkdir ${PWD}/workdir
else
rm -rf ${PWD}/workdir/*
fi
if [[ -d ${PWD}/script.d ]]; then if [[ -d ${PWD}/script.d ]]; then
PATCHIMAGE_SCRIPT_DIR=../script.d PATCHIMAGE_SCRIPT_DIR=${PWD}/script.d
PATCHIMAGE_PATCH_DIR=../patches PATCHIMAGE_PATCH_DIR=${PWD}/patches
PATCHIMAGE_TOOLS_DIR=../tools PATCHIMAGE_TOOLS_DIR=${PWD}/tools
else else
PATCHIMAGE_SCRIPT_DIR=/usr/share/patchimage/script.d PATCHIMAGE_SCRIPT_DIR=/usr/share/patchimage/script.d
PATCHIMAGE_PATCH_DIR=/usr/share/patchimage/patches PATCHIMAGE_PATCH_DIR=/usr/share/patchimage/patches
PATCHIMAGE_TOOLS_DIR=/usr/share/patchimage/tools PATCHIMAGE_TOOLS_DIR=/usr/share/patchimage/tools
fi fi
cd ${PWD}/workdir
PATCHIMAGE_RIIVOLUTION_DIR=${PWD} PATCHIMAGE_RIIVOLUTION_DIR=${PWD}
PATCHIMAGE_WBFS_DIR=${PWD} PATCHIMAGE_WBFS_DIR=${PWD}
PATCHIMAGE_AUDIO_DIR=${PWD} PATCHIMAGE_AUDIO_DIR=${PWD}
@ -174,7 +166,7 @@ case ${GAME_TYPE} in
echo "*** 12) remove workdir" echo "*** 12) remove workdir"
cd .. cd ..
rm -rf workdir rm -rf ${WORKDIR}
echo -e "\n >>> ${GAMENAME} saved as: ${PATCHIMAGE_WBFS_DIR}/${GAMEID}.wbfs\n" echo -e "\n >>> ${GAMENAME} saved as: ${PATCHIMAGE_WBFS_DIR}/${GAMEID}.wbfs\n"

View File

@ -160,12 +160,12 @@ check_input_image () {
x=0 x=0
if [[ ! ${IMAGE} ]]; then if [[ ! ${IMAGE} ]]; then
if [[ -f BASE.wbfs ]]; then if [[ *.wbfs ]]; then
x=1 x=1
IMAGE=BASE.wbfs IMAGE=*.wbfs
elif [[ -f BASE.iso ]]; then elif [[ *.iso ]]; then
x=1 x=1
IMAGE=BASE.iso IMAGE=*.iso
fi fi
fi fi
echo "*** >> status: ${x}" echo "*** >> status: ${x}"
@ -250,7 +250,7 @@ ask_input_image_wiimmfi () {
echo "Choose Wii Game Image to wiimmfi" echo "Choose Wii Game Image to wiimmfi"
for image in ${1}/??????.{iso,wbfs}; do for image in ${1}/*.{iso,wbfs}; do
if [[ -e ${image} && ! ${image} == "*/RMC*" ]]; then if [[ -e ${image} && ! ${image} == "*/RMC*" ]]; then
echo " ${image##*/}" echo " ${image##*/}"
fi fi