Skip to content

Commit

Permalink
More problem perl6 script into perl6-testing so we can get working bu…
Browse files Browse the repository at this point in the history
…ilds back

This breaks relative paths, but giving it full paths works fine
  • Loading branch information
samcv committed Apr 10, 2017
1 parent b671d60 commit a56689f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 31 deletions.
35 changes: 4 additions & 31 deletions perl6
Original file line number Diff line number Diff line change
@@ -1,31 +1,4 @@
#!/usr/bin/env bash
#Get the directory you ran the script from
IMAGE_PWD="$(pwd)"
cd "$OWD"
i=$(($#-1))
function argv {
for a in ${BASH_ARGV[*]} ; do
arg="$a"
if [ "$APPIMAGE_DEBUG" ]; then echo $i; fi
first_letter=$(printf %.1s "$arg")
if [ $first_letter != '-' ]; then
arg=$(readlink -f "$arg")
fi
NEWARGS[$i]="$arg"
i=$((i-1))
done
}
argv
function debug {
for a in ${NEWARGS[*]} ; do
echo $a
done
}
if [ "$APPIMAGE_DEBUG" ]; then debug; fi

cd "$IMAGE_PWD"
exec ./bin/moar --execname="$APPIMAGE" --libpath="././share/nqp/lib" --libpath="././share/nqp/lib" \
--libpath="././share/perl6/lib" \
--libpath="././share/perl6/runtime" \
././share/perl6/runtime/perl6.moarvm \
"${NEWARGS[@]}"
#!/bin/sh
exec ./bin/moar --execname="$0" --libpath="././share/nqp/lib" \
--libpath="././share/nqp/lib" --libpath="././share/perl6/lib" \
--libpath="././share/perl6/runtime" ././share/perl6/runtime/perl6.moarvm "$@"
31 changes: 31 additions & 0 deletions perl6-testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash
#Get the directory you ran the script from
IMAGE_PWD="$(pwd)"
cd "$OWD"
i=$(($#-1))
function argv {
for a in ${BASH_ARGV[*]} ; do
arg="$a"
if [ "$APPIMAGE_DEBUG" ]; then echo $i; fi
first_letter=$(printf %.1s "$arg")
if [ $first_letter != '-' ]; then
arg=$(readlink -f "$arg")
fi
NEWARGS[$i]="$arg"
i=$((i-1))
done
}
argv
function debug {
for a in ${NEWARGS[*]} ; do
echo $a
done
}
if [ "$APPIMAGE_DEBUG" ]; then debug; fi

cd "$IMAGE_PWD"
exec ./bin/moar --execname="$APPIMAGE" --libpath="././share/nqp/lib" --libpath="././share/nqp/lib" \
--libpath="././share/perl6/lib" \
--libpath="././share/perl6/runtime" \
././share/perl6/runtime/perl6.moarvm \
"${NEWARGS[@]}"

0 comments on commit a56689f

Please sign in to comment.