styling and fixes
This commit is contained in:
parent
ec2ec6eb5f
commit
7ee09605c2
@ -1,22 +1,22 @@
|
||||
# designed to be called from top level project dir
|
||||
script_folder=$(dirname $0)
|
||||
source config/asc.conf || exit 1
|
||||
sqlplus $username/$password@$database_connection @$script_folder/generate_new_app_id.sql || exit 1
|
||||
sqlplus ${username}/${password}@${database_connection} @${script_folder}/generate_new_app_id.sql || exit 1
|
||||
|
||||
app_id=$(cat config/new_app_id.txt)
|
||||
app_id=$(head -n 1 config/new_app_id.txt)
|
||||
|
||||
if [ -h config/asc.conf ]; then
|
||||
conf_file=$(readlink ./config/asc.conf)
|
||||
echo "The id ${app_id} will be written to ${conf_file}. Is this alright? [y/N]: "
|
||||
read read_bool
|
||||
echo "The id '${app_id}' will be written to '${conf_file}'. Is this alright? [y/N]: "
|
||||
read can_write
|
||||
|
||||
if [ $read_bool == "y" ]; then
|
||||
if [ "${can_write}" == "y" ]; then
|
||||
sed -i 's/^apexappid=.*/apexappid=${app_id}/' config/${conf_file}
|
||||
echo "apexappid in ${conf_file} has been replaced with ${app_id}. The new config file looks like this: "
|
||||
echo "apexappid in '${conf_file}' has been replaced with '${app_id}'. The new config file looks like this: "
|
||||
cat config/${conf_file}
|
||||
else
|
||||
echo -n "The generated app id was not written to file. "
|
||||
echo "You can change this manually by changing the apexappid of your config to ${app_id}"
|
||||
echo "You can change this manually by changing the apexappid of your config to '${app_id}'"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user