stack_wallet/scripts/app_config/configure_stack_duo.sh

44 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
set -x -e
# Configure files for Duo.
export NEW_NAME="Stack Duo"
export NEW_APP_ID="com.cypherstack.stackduo"
2024-05-22 23:56:51 +00:00
export NEW_APP_ID_CAMEL="com.cypherstack.stackDuo"
export NEW_APP_ID_SNAKE="com.cypherstack.stack_duo"
export NEW_BASIC_NAME="stack_duo"
2024-05-22 23:56:51 +00:00
NEW_PUBSPEC_NAME="stackduo"
PUBSPEC_FILE="${APP_PROJECT_ROOT_DIR}/pubspec.yaml"
# String replacements.
if [[ "$(uname)" == 'Darwin' ]]; then
# macos specific sed
2024-05-22 23:56:51 +00:00
sed -i '' "s/name: PLACEHOLDER/name: ${NEW_PUBSPEC_NAME}/g" "${PUBSPEC_FILE}"
sed -i '' "s/description: PLACEHOLDER/description: ${NEW_NAME}/g" "${PUBSPEC_FILE}"
else
2024-05-22 23:56:51 +00:00
sed -i "s/name: PLACEHOLDER/name: ${NEW_PUBSPEC_NAME}/g" "${PUBSPEC_FILE}"
sed -i "s/description: PLACEHOLDER/description: ${NEW_NAME}/g" "${PUBSPEC_FILE}"
fi
APP_CONFIG_DART_FILE="${APP_PROJECT_ROOT_DIR}/lib/app_config.g.dart"
rm -f "$APP_CONFIG_DART_FILE"
cat << EOF > "$APP_CONFIG_DART_FILE"
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'app_config.dart';
const _prefix = "Stack";
const _separator = " ";
const _suffix = "Duo";
2024-05-23 15:20:11 +00:00
const _appDataDirName = "stackduo";
final List<CryptoCurrency> _supportedCoins = List.unmodifiable([
Bitcoin(CryptoCurrencyNetwork.main),
Monero(CryptoCurrencyNetwork.main),
Bitcoin(CryptoCurrencyNetwork.test),
]);
EOF