-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsc4pac
executable file
·30 lines (25 loc) · 1.4 KB
/
sc4pac
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
#!/usr/bin/env bash
# This file is a modified copy of src/scripts/sc4pac for testing purposes.
#
# Invocation of sc4pac command-line interface on Linux or macOS.
# In a terminal, call:
#
# ./sc4pac
#
# You can create an alias or a symlink to this file in order to add it to your
# path to run it from any directory. Files like sc4pac-plugins.json are then
# created in that directory, which allows to manage multiple plugins folders.
set -e
# Find the location of this script, accounting for symlinks, see https://stackoverflow.com/a/246128
SCRIPTDIR="$( cd -P "$( dirname "$(readlink -f "${BASH_SOURCE[0]}")" )" >/dev/null 2>&1 && pwd )"
# Basic support for authentication to Simtropolis is provided via cookies.
# Either set this as environment variable or uncomment the line below and fill in the values.
# For details, see the instructions in `sc4pac.bat`.
#
# export SC4PAC_SIMTROPOLIS_COOKIE="ips4_device_key=<value>; ips4_member_id=<value>; ips4_login_key=<value>"
# We set defaults for environment variables if they are not defined.
# The environment variable `SC4PAC_MONO_CMD` is only needed on Linux and macOS.
# If you happen to run this script on Windows without Mono installed, remove the environment variable.
export SC4PAC_MONO_CMD="${SC4PAC_MONO_CMD-"mono"}"
export SC4PAC_CICDEC_CMD="${SC4PAC_CICDEC_CMD-"${SCRIPTDIR}/cicdec/cicdec.exe"}"
java -jar "${SCRIPTDIR}/target/scala-3.4.2/sc4pac-cli.jar" "$@"