mirror of
https://gitlab.com/Nanolx/patchimage.git
synced 2024-12-28 02:01:47 +01:00
common.sh: remove some ./, add quotes, remove unnecessary code
This commit is contained in:
parent
91ca117671
commit
ba4ed1ac05
@ -5,9 +5,9 @@ TMD_OPTS="--ticket-id=K --tmd-id=K"
|
|||||||
setup_tools () {
|
setup_tools () {
|
||||||
|
|
||||||
if [[ $(uname -m) == "x86_64" ]]; then
|
if [[ $(uname -m) == "x86_64" ]]; then
|
||||||
WIT=./tools/wit.64
|
WIT=tools/wit.64
|
||||||
else
|
else
|
||||||
WIT=./tools/wit.32
|
WIT=tools/wit.32
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -56,10 +56,10 @@ download_soundtrack () {
|
|||||||
check_input_image () {
|
check_input_image () {
|
||||||
|
|
||||||
if [[ ! ${IMAGE} ]]; then
|
if [[ ! ${IMAGE} ]]; then
|
||||||
if [[ -f ./BASE.wbfs ]]; then
|
if [[ -f BASE.wbfs ]]; then
|
||||||
IMAGE=./BASE.wbfs
|
IMAGE=BASE.wbfs
|
||||||
elif [[ -f ./BASE.iso ]]; then
|
elif [[ -f BASE.iso ]]; then
|
||||||
IMAGE=./BASE.iso
|
IMAGE=BASE.iso
|
||||||
else
|
else
|
||||||
echo -e "please specify image to use with --iso=<path>"
|
echo -e "please specify image to use with --iso=<path>"
|
||||||
exit 1
|
exit 1
|
||||||
@ -71,11 +71,11 @@ check_input_image () {
|
|||||||
check_riivolution_patch () {
|
check_riivolution_patch () {
|
||||||
|
|
||||||
if [[ ${DOWNLOAD} ]]; then
|
if [[ ${DOWNLOAD} ]]; then
|
||||||
wget ${DOWNLOAD_LINK} -O ./${RIIVOLUTION_ZIP}
|
wget ${DOWNLOAD_LINK} -O ${RIIVOLUTION_ZIP}
|
||||||
unzip ./${RIIVOLUTION_ZIP} >/dev/null
|
unzip ${RIIVOLUTION_ZIP} >/dev/null
|
||||||
elif [[ -f ./${RIIVOLUTION_ZIP} && ! -d ./${RIIVOLUTION_DIR} ]]; then
|
elif [[ -f ${RIIVOLUTION_ZIP} && ! -d "${RIIVOLUTION_DIR}" ]]; then
|
||||||
unzip ./${RIIVOLUTION_ZIP} >/dev/null
|
unzip ${RIIVOLUTION_ZIP} >/dev/null
|
||||||
elif [[ ! -d ./${RIIVOLUTION_DIR} ]]; then
|
elif [[ ! -d "${RIIVOLUTION_DIR}" ]]; then
|
||||||
echo -e "please specify zip to use with --riivolution=<path>"
|
echo -e "please specify zip to use with --riivolution=<path>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -96,7 +96,7 @@ while [[ $xcount -lt $pcount ]]; do
|
|||||||
|
|
||||||
if [[ -e "${ISO_PATH}" ]]; then
|
if [[ -e "${ISO_PATH}" ]]; then
|
||||||
ln -sf "${ISO_PATH}" ./BASE.${ISO_EXT}
|
ln -sf "${ISO_PATH}" ./BASE.${ISO_EXT}
|
||||||
IMAGE=./BASE.${ISO_EXT}
|
IMAGE=BASE.${ISO_EXT}
|
||||||
else
|
else
|
||||||
echo -e "ISO not found"
|
echo -e "ISO not found"
|
||||||
exit1
|
exit1
|
||||||
@ -133,27 +133,22 @@ while [[ $xcount -lt $pcount ]]; do
|
|||||||
VERSION=${1/*=}
|
VERSION=${1/*=}
|
||||||
case ${VERSION} in
|
case ${VERSION} in
|
||||||
EURv1 )
|
EURv1 )
|
||||||
PATCH=./patches/EURv1.ppf
|
|
||||||
REG_LETTER=P
|
REG_LETTER=P
|
||||||
;;
|
;;
|
||||||
|
|
||||||
EURv2 )
|
EURv2 )
|
||||||
PATCH=./patches/EURv2.ppf
|
|
||||||
REG_LETTER=P
|
REG_LETTER=P
|
||||||
;;
|
;;
|
||||||
|
|
||||||
USAv1 )
|
USAv1 )
|
||||||
PATCH=./patches/USAv1.ppf
|
|
||||||
REG_LETTER=E
|
REG_LETTER=E
|
||||||
;;
|
;;
|
||||||
|
|
||||||
USAv2 )
|
USAv2 )
|
||||||
PATCH=./patches/USAv2.ppf
|
|
||||||
REG_LETTER=E
|
REG_LETTER=E
|
||||||
;;
|
;;
|
||||||
|
|
||||||
JPNv1 )
|
JPNv1 )
|
||||||
PATCH=./patches/JPNv1.ppf
|
|
||||||
REG_LETTER=J
|
REG_LETTER=J
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user