From a2a598e67cd24057a6a32d72e4be7f2709efcccb Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Fri, 2 Aug 2019 18:48:38 -0500 Subject: [PATCH] Added xcf2sta.sh --- scripts/build-IIgs.helper.sh | 4 ++-- scripts/installer.sh | 2 +- scripts/xcf2sta.sh | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100755 scripts/xcf2sta.sh diff --git a/scripts/build-IIgs.helper.sh b/scripts/build-IIgs.helper.sh index f8ef852..516594a 100644 --- a/scripts/build-IIgs.helper.sh +++ b/scripts/build-IIgs.helper.sh @@ -69,9 +69,9 @@ function buildIIgs() { # If they asked for source to be copied to the image, copy it and set the type for S in "${SOURCE[@]}"; do for F in `ls -1 ${S}`; do - tr "\n" "\r" < ${F} > /tmp/IIgs/source/${F}#040000 + tr "\n" "\r" < ${F} > ${WORK}/source/${F}#040000 ${CADIUS} addfile ${IMPORT} ${VOL} ${F}#040000 > /dev/null - rm /tmp/IIgs/source/${F}#040000 + rm ${WORK}/source/${F}#040000 done done diff --git a/scripts/installer.sh b/scripts/installer.sh index db575c8..98ef83e 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -787,7 +787,7 @@ function start() { uuid-dev libssl-dev bash patch make tar xz-utils bzip2 gzip sed cpio \ libpulse-dev{,:i386} libasound2-dev{,:i386} \ libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libfreetype6-dev libpcap0.8-dev \ - php-cli msitools hatari lhasa bison + php-cli msitools hatari lhasa bison xcftools if [[ "${MISSING}" != "" ]]; then if (whiptail --title "${G_TITLE}" --yesno "Some required packages are missing.\n\nInstall them now?" 9 40); then diff --git a/scripts/xcf2sta.sh b/scripts/xcf2sta.sh new file mode 100755 index 0000000..59979dd --- /dev/null +++ b/scripts/xcf2sta.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +if [ -z $1 ]; then + echo $0 [name.xcf] {anything} + exit 1 +fi + +NAME=$(basename $1 .xcf) +DIR=$(dirname $1) +TARGET=/tmp/xcf2sta +TEMPIMAGE=${TARGET}/fixImageTemp.png + +mkdir -p ${TARGET}/data +xcf2png ${1} > ${TEMPIMAGE} + +pushd ${TARGET} +${JOEY}/utils/imgconvert ${TEMPIMAGE} ${NAME} $2 +popd + +mv -f ${TARGET}/data/${NAME}.sta ${DIR}/${NAME}.sta + +rm ${TEMPIMAGE}