50 lines
1.2 KiB
Bash
Executable File
50 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
#set -euxo pipefail
|
|
set -euo pipefail
|
|
|
|
#
|
|
# EXIT CODES
|
|
############
|
|
DEFAULT_REQ_TOOL_EXIT_CODE=1
|
|
DEFAULT_ARG_ERROR_EXIT_CODE=2
|
|
DEFAULT_MAIN_ERROR_EXIT_CODE=10
|
|
|
|
# Define the file path
|
|
FILE_PATH="${BASH_SOURCE%/*}/MetaPluginDemo/Credentials.swift"
|
|
|
|
# remove filename
|
|
TARGET_DIRECTORY="${FILE_PATH%/*}"
|
|
|
|
mkdir -p "$TARGET_DIRECTORY"
|
|
|
|
# Check if the file does not exist
|
|
if [[ ! -f $FILE_PATH ]]; then
|
|
# The file does not exist, create it with the specified content using a here document
|
|
cat << 'EOF' > "$FILE_PATH"
|
|
/*
|
|
* Created by WebID Solutions GmbH | www.webid-solutions.de.
|
|
* See the file "LICENSE" for the full license governing this code.
|
|
*/
|
|
|
|
|
|
import Foundation
|
|
|
|
class Credentials {
|
|
|
|
static let demoUsernameTest: String = "your demo user name for test"
|
|
static let demoApiKeyTest: String = "your demo api key for test"
|
|
|
|
static let demoUsernameProduction: String = "your demo user name for production"
|
|
static let demoApiKeyProduction: String = "your demo api key for production"
|
|
|
|
static let actionId: String = "your action-id here"
|
|
|
|
static let environment : EWebIDEnv.WebIDEnv = EWebIDEnv.TEST
|
|
}
|
|
|
|
EOF
|
|
else
|
|
echo "The file already exists."
|
|
fi
|