mirror of
https://github.com/Phantop/appdwarf.git
synced 2024-09-19 00:19:42 +00:00
fix regression in outfunc handling for app scripts
This commit is contained in:
parent
a6a30c56ad
commit
4f6c908ee9
5
appdwarf
5
appdwarf
|
@ -57,7 +57,7 @@ header() {
|
||||||
outfunc() {
|
outfunc() {
|
||||||
echo '#!/bin/sh'
|
echo '#!/bin/sh'
|
||||||
echo 'set -e' # running outfunc with no input just prints these two lines
|
echo 'set -e' # running outfunc with no input just prints these two lines
|
||||||
sed -n "/^$1() {$/,/^}$/s/^ *//p" "$0" | tail -n+2 | head -n-1
|
sed -n "/^$1() {$/,/^}$/s/^ *//p" "$script" | tail -n+2 | head -n-1
|
||||||
}
|
}
|
||||||
|
|
||||||
unappimage() {
|
unappimage() {
|
||||||
|
@ -92,11 +92,14 @@ zzexe_header() {
|
||||||
|
|
||||||
if [ "$SOURCE" ]; then
|
if [ "$SOURCE" ]; then
|
||||||
unset SOURCE
|
unset SOURCE
|
||||||
|
script="$(which appdwarf)"
|
||||||
trap 'rm -rf "$DIR"' 0 1 2 3 6 14 15 EXIT
|
trap 'rm -rf "$DIR"' 0 1 2 3 6 14 15 EXIT
|
||||||
APP=$(basename "$0" | sed 's/^mk//')
|
APP=$(basename "$0" | sed 's/^mk//')
|
||||||
DIR=/tmp/appdwarf/$APP
|
DIR=/tmp/appdwarf/$APP
|
||||||
mkdir -p "$DIR"
|
mkdir -p "$DIR"
|
||||||
return
|
return
|
||||||
|
else
|
||||||
|
script="$0"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
|
|
@ -3,4 +3,5 @@ set -e # exit on failure
|
||||||
IFS=$(printf '\n\t') # smarter ifs
|
IFS=$(printf '\n\t') # smarter ifs
|
||||||
|
|
||||||
cd "$(dirname "$(realpath "$0")")/bin"
|
cd "$(dirname "$(realpath "$0")")/bin"
|
||||||
|
rm -f "$(echo "$1" | sed 's/arch-//')"
|
||||||
appdwarf -g "$1"
|
appdwarf -g "$1"
|
||||||
|
|
|
@ -34,7 +34,7 @@ apprun() {
|
||||||
}
|
}
|
||||||
if [ "$PREFIX" ]; then
|
if [ "$PREFIX" ]; then
|
||||||
WINEPREFIX="$DIR/prefix" "$DIR/bin/wine" cmd /c exit
|
WINEPREFIX="$DIR/prefix" "$DIR/bin/wine" cmd /c exit
|
||||||
appb
|
appa
|
||||||
fi
|
fi
|
||||||
|
|
||||||
appmk
|
appmk
|
||||||
|
|
Loading…
Reference in a new issue