Changeset 18498 in josm


Ignore:
Timestamp:
2022-06-23T00:07:10+02:00 (2 years ago)
Author:
taylor.smock
Message:

Fix issues from checkbashisms introduced in r18497

Location:
trunk/native/linux
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/native/linux/latest/usr/bin/josm-latest

    r18497 r18498  
    1 #!/usr/bin/bash
     1#!/usr/bin/env bash
    22# Simple wrapper script used to start JOSM in Debian
    3 set -e
     3set -ex
    44
    55# First, the alternative (if known to work) or users preference as defined by $JAVA_HOME. Next, use OpenJDK.
     
    3737}
    3838
     39java_version() {
     40  ${1} -version 2>&1 | head -n1 | awk '{print $3}' | awk -F'.' '{gsub(/"/, ""); print $1}' | cat
     41}
     42
    3943if [ -x "$(command -v dpkg)" ]; then
    4044        dpkg_java
     
    7074if [ "$JAVACMD" ]; then
    7175    echo "Using $JAVACMD to execute ${JOSM_VERSION}." || true
    72     JAVA_VERSION="$(${JAVACMD} -version 2>&1 | head -n1 | awk '{print $3}' | awk -F'.' '{gsub(/"/, ""); print $1}')"
     76    JAVA_VERSION=$(java_version ${JAVACMD})
    7377    JAVAFX_HOME="${JAVAFX_HOME:-/usr/share/openjfx/lib}"
    7478    JOSM_PATH="${JOSM_PATH:-/usr/share/${JOSM_VERSION}/${JOSM_VERSION}.jar}"
  • trunk/native/linux/tested/usr/bin/josm

    r18497 r18498  
    3737}
    3838
     39java_version() {
     40  ${1} -version 2>&1 | head -n1 | awk '{print $3}' | awk -F'.' '{gsub(/"/, ""); print $1}' | cat
     41}
     42
    3943if [ -x "$(command -v dpkg)" ]; then
    4044        dpkg_java
     
    7074if [ "$JAVACMD" ]; then
    7175    echo "Using $JAVACMD to execute ${JOSM_VERSION}." || true
    72     JAVA_VERSION="$(${JAVACMD} -version 2>&1 | head -n1 | awk '{print $3}' | awk -F'.' '{gsub(/"/, ""); print $1}')"
     76    JAVA_VERSION=$(java_version ${JAVACMD})
    7377    JAVAFX_HOME="${JAVAFX_HOME:-/usr/share/openjfx/lib}"
    7478    JOSM_PATH="${JOSM_PATH:-/usr/share/${JOSM_VERSION}/${JOSM_VERSION}.jar}"
Note: See TracChangeset for help on using the changeset viewer.