forked from martanne/vis
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
single: allow to build self-extracting executable
This allows to create a self extracting executable. The standalone binary and lua files are extracted to /tmp/.vis-XXXXXX, vis is started with the given command line arguments, finally temporary files are removed. Signed-off-by: Christian Hesse <[email protected]>
- Loading branch information
Showing
3 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
/dependency | ||
/vis | ||
/vis-menu | ||
/vis-single | ||
*.css | ||
*.gcda | ||
*.gcno | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
VISTMP="$(mktemp -d -p "${TMPDIR:-/tmp}" .vis-XXXXXX)" | ||
trap 'rm -rf "$VISTMP"' EXIT INT QUIT TERM HUP | ||
|
||
sed '1,/^__TAR_GZ_ARCHIVE_BELOW__$/d' "$0" | gzip -d | tar xC "$VISTMP" | ||
|
||
"$VISTMP/vis" "$@" | ||
|
||
exit $? | ||
|
||
__TAR_GZ_ARCHIVE_BELOW__ |