Added xcf2sta.sh

This commit is contained in:
Scott Duensing 2019-08-02 18:48:38 -05:00
parent 35193272f0
commit a2a598e67c
3 changed files with 25 additions and 3 deletions

View file

@ -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

View file

@ -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

22
scripts/xcf2sta.sh Executable file
View file

@ -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}