mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-04-05 00:54:17 -04:00
The changes update the URL used to fetch the Romm configuration file. The previous URL was pointing to an outdated location, so the new URL is updated to fetch the config from the correct location on the master branch.
28 lines
975 B
Bash
28 lines
975 B
Bash
#!/usr/bin/env bash
|
|
|
|
# Ask the user for the desired config location
|
|
read -p "Enter the location to save the config (default: /DATA/AppData/big-bear-romm/config/config.yml): " location
|
|
|
|
# If the user doesn't provide a location, default to the specified path
|
|
if [ -z "$location" ]; then
|
|
location="/DATA/AppData/big-bear-romm/config/config.yml"
|
|
fi
|
|
|
|
# Check if the config file already exists
|
|
if [ -e "$location" ]; then
|
|
read -p "Warning: $location already exists. Do you want to replace it? (yes/no) " replace
|
|
if [[ "$replace" != "yes" ]]; then
|
|
echo "Operation cancelled."
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Create the directory (and its parents) if it doesn't exist
|
|
mkdir -p "$(dirname "$location")"
|
|
|
|
# Download the file from the given URL and save it to the specified location
|
|
curl -L "https://raw.githubusercontent.com/bigbeartechworld/big-bear-casaos/refs/heads/master/Apps/romm/config.yml" -o "$location"
|
|
|
|
# Confirm to the user
|
|
echo "Config saved to $location"
|