From f1da4e8fb04bcf3fc50c3a26498cbf2596525255 Mon Sep 17 00:00:00 2001 From: almostalive Date: Fri, 9 Nov 2012 12:56:39 -0600 Subject: [PATCH] Minor change to retorach-zip removed tmprom and uses tmpdir/filename instead. --- retroarch-zip | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/retroarch-zip b/retroarch-zip index afccf72784..114ae5e714 100755 --- a/retroarch-zip +++ b/retroarch-zip @@ -8,7 +8,6 @@ die() { echo "Error: $1" - rm "${TMPROM}" rm -r "${TMPDIR}" exit 1 } @@ -18,7 +17,6 @@ if [ -z "$1" ]; then fi COMP_FILE="$1" -TMPROM="`mktemp`" TMPDIR="`mktemp -d`" shift @@ -63,7 +61,6 @@ FILENAME="`ls -Sp \"${TMPDIR}\" | grep -v /$ | head -n1`" if [ -z "${FILENAME}" ]; then die "Cannot find any files in root of archive" fi -mv "${TMPDIR}/${FILENAME}" "${TMPROM}" SAVENAME="`basename \"${COMP_FILE}\" ${EXTENSION}`" SAVESTATE="`basename \"${COMP_FILE}\" ${EXTENSION}`" @@ -76,10 +73,9 @@ if [ -z "${EXE}" ]; then die "Cannot find RetroArch in path." fi -echo "Temp ROM: ${TMPROM}" +echo "Temp ROM: ${TMPDIR}/${FILENAME}" echo "Savename: ${DIRNAME}/${SAVENAME}" echo "Savestate: ${DIRNAME}/${SAVESTATE}" -"${EXE}" "${TMPROM}" -s "${DIRNAME}/${SAVENAME}" -S "${DIRNAME}/${SAVESTATE}" "$@" -rm "${TMPROM}" +"${EXE}" "${TMPDIR}/${FILENAME}" -s "${DIRNAME}/${SAVENAME}" -S "${DIRNAME}/${SAVESTATE}" "$@" rm -r "${TMPDIR}"