File: AppRun

package info (click to toggle)
librepcb 1.2.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 58,484 kB
  • sloc: cpp: 267,986; python: 12,100; ansic: 6,899; xml: 234; sh: 215; makefile: 115; perl: 73
file content (16 lines) | stat: -rwxr-xr-x 542 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env sh

# Wrapper allowing to bundle both the GUI and the CLI in a single AppImage.
# If the called AppImage has "cli" in its name, the CLI executable is invoked.
# If not, the GUI executable is invoked.

# See https://discourse.appimage.org/t/call-alternative-binary-from-appimage/93.

HERE="$(dirname "$(readlink -f "${0}")")"
BINARY_NAME=$(basename "$ARGV0")

case $BINARY_NAME in
  *cli*) exec "$HERE/opt/bin/librepcb-cli" "$@";;
  *CLI*) exec "$HERE/opt/bin/librepcb-cli" "$@";;
  *) exec "$HERE/opt/bin/librepcb" "$@";;
esac