final fixes to generate-app-id new feature

This commit is contained in:
nathan 2016-06-06 15:59:32 -04:00
parent bb2fb8e319
commit fe15d3a713

View File

@ -3,7 +3,7 @@ script_folder=$(dirname $0)
source config/asc.conf || exit 1 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=$(head -c -1 new_app_id.txt | sed -e 's/[[:space:]]*$//') app_id=$(head -c -1 config/new_app_id.txt | sed -e 's/[[:space:]]*$//')
if [ -h config/asc.conf ]; then if [ -h config/asc.conf ]; then
conf_file=$(readlink ./config/asc.conf) conf_file=$(readlink ./config/asc.conf)
@ -11,7 +11,7 @@ if [ -h config/asc.conf ]; then
read can_write read can_write
if [ "${can_write}" == "y" ]; then if [ "${can_write}" == "y" ]; then
sed -i 's/^apexappid=.*/apexappid=${app_id}/' config/${conf_file} 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} cat config/${conf_file}
else else