forked from obel1x/fedora-OEMDRV
Configure: Take given REPO_URL and BRANCH to new installation
This commit is contained in:
@@ -88,7 +88,24 @@ if [[ ! -z "${DISTCONFIGPATH_SRC}" ]]; then
|
||||
echo "Existing configuration found in Repository, removing configure-mode and reread the configuration."
|
||||
rm -f $(dirname "$0")/../config.d/configure.conf.bak >/dev/null
|
||||
mv $(dirname "$0")/../config.d/configure.conf $(dirname "$0")/../config.d/configure.conf.bak
|
||||
source $(dirname "$0")/../config/setup_system.conf
|
||||
OLD_REPO_URL="$REPO_URL"
|
||||
OLD_REPO_BRANCH="$REPO_BRANCH"
|
||||
source $(dirname "$0")/setup_system.inc.sh
|
||||
#Compare the Repository URLS after that
|
||||
if [ "$REPO_URL" != "$OLD_REPO_URL" || "$REPO_BRANCH" != "$OLD_REPO_BRANCH" ]; then
|
||||
echo "The Repository for installation was"
|
||||
echo "$OLD_REPO_URL Branch $OLD_REPO_BRANCH"
|
||||
echo "After reading the config, the Repository has changed to"
|
||||
echo "$REPO_URL Branch $REPO_BRANCH"
|
||||
echo
|
||||
echo "Do you want to create a system specific configuration for the installation Repository, so that"
|
||||
read -r -p "only this system will stay on the Repository for installation? [y/N]: " CREATE_REPO_CONF
|
||||
if [[ "${CREATE_REPO_CONF,,}" == "y" ]]; then
|
||||
echo "export REPO_URL=\"$OLD_REPO_URL\"" >$(dirname "$0")/../config.d/repo.conf
|
||||
echo "export REPO_BRANCH=\"$OLD_REPO_BRANCH\"" >>$(dirname "$0")/../config.d/repo.conf
|
||||
echo "Wrote new $(dirname "$0")/../config.d/repo.conf"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "System is in configure-mode and configuration repository was found and synced, but still not configuration was found"
|
||||
echo "checking file $(dirname "$0")/../config/setup_system.conf"
|
||||
|
||||
Reference in New Issue
Block a user