From d22bf06e80da99ca99e314c58d9a4d749c181b02 Mon Sep 17 00:00:00 2001 From: Simen Sandvaer Date: Sun, 16 Oct 2022 21:22:36 +0200 Subject: [PATCH] Clean up duplicate commands in activate.sh --- dist/platforms/ubuntu/steps/activate.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/platforms/ubuntu/steps/activate.sh b/dist/platforms/ubuntu/steps/activate.sh index 2773205f..c302417a 100755 --- a/dist/platforms/ubuntu/steps/activate.sh +++ b/dist/platforms/ubuntu/steps/activate.sh @@ -83,12 +83,12 @@ elif [[ -n "$UNITY_LICENSING_SERVER" ]]; then cat services-config.json.template | tr -d '\r' | awk "{sub(/%URL%/,\"$UNITY_LICENSING_SERVER\")}1" > services-config.json mkdir -p /usr/share/unity3d/config/ mv services-config.json /usr/share/unity3d/config/ - # Activate license - /opt/unity/Editor/Data/Resources/Licensing/Client/Unity.Licensing.Client --acquire-floating > license.txt - # shellcheck disable=SC2002 + + /opt/unity/Editor/Data/Resources/Licensing/Client/Unity.Licensing.Client --acquire-floating > license.txt #is this accessible in a env variable? + PARSEDFILE=$(grep -oP '\".*?\"' < license.txt | tr -d '"') export FLOATING_LICENSE - FLOATING_LICENSE=$(grep -oP '\".*?\"' < license.txt | tr -d '"' | sed -n 2p) - FLOATING_LICENSE_TIMEOUT=$(grep -oP '\".*?\"' < license.txt | tr -d '"' | sed -n 4p) + FLOATING_LICENSE=$("$PARSEDFILE" | sed -n 2p) + FLOATING_LICENSE_TIMEOUT=$("$PARSEDFILE" | sed -n 4p) echo "Acquired floating license: \"$FLOATING_LICENSE\" with timeout $FLOATING_LICENSE_TIMEOUT" # Store the exit code from the verify command