File: arduino

package info (click to toggle)
arduino 2%3A1.8.13%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 23,888 kB
  • sloc: java: 26,565; python: 8,872; cpp: 3,573; xml: 1,267; sh: 552; perl: 90; ansic: 89; makefile: 52
file content (52 lines) | stat: -rwxr-xr-x 1,345 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash

APPDIR=/usr/share/arduino

if [[ `id -u` -ne 0 ]]; then
#    for group in dialout tty; do
    for group in dialout; do
        if ! groups | grep -q "\b$group\b"; then
            missing_groups="$missing_groups\n$group"
        fi
    done

    if [[ -n "$missing_groups" ]] && ! java -jar /usr/share/arduino/arduinopc.jar; then
        pkexec /usr/bin/arduino-add-groups
    fi
fi


for LIB in \
    "$APPDIR"/java/lib/rt.jar \
    "$APPDIR"/java/lib/tools.jar \
    "$APPDIR"/lib/*.jar \
    ;
do
    CLASSPATH="${CLASSPATH}:${LIB}"
done
export CLASSPATH

DEB_HOST_MULTIARCH=`dpkg-architecture -qDEB_HOST_MULTIARCH`

LD_LIBRARY_PATH="/usr/lib/jni/${DEB_HOST_MULTIARCH}:/usr/lib/${DEB_HOST_MULTIARCH}:/usr/lib/jni${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export LD_LIBRARY_PATH

export PATH="${APPDIR}/java/bin:${PATH}"

export JAVA_TOOL_OPTIONS=`echo $JAVA_TOOL_OPTIONS | sed 's|-javaagent:/usr/share/java/jayatanaag.jar||g'`

JAVA=java
if [ -x "$APPDIR/java/bin/java" ]; then
  JAVA=$APPDIR/java/bin/java
fi

# Collect options to java in an array, to properly handle whitespace in options
JAVA_OPTIONS=("-DAPP_DIR=$APPDIR")

# Only show the splash screen when no options are present
if [[ "$@" != *"--"* ]] ; then
	JAVA_OPTIONS+=("-splash:$APPDIR/lib/splash.png")
fi


"$JAVA" "${JAVA_OPTIONS[@]}" processing.app.Base "$@"