Skip to content

Commit

Permalink
build: fix curlable bash install script
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Nov 2, 2023
1 parent 8d31a9f commit 0021803
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
4 changes: 2 additions & 2 deletions scripts/setup/docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ add_to_apt() {
echo "Done"
}

install_docker() {
apt_install_docker() {
pretty_echo "Installing Docker"
sudo apt-get update
sudo apt-get install -y \
Expand Down Expand Up @@ -138,7 +138,7 @@ install_docker() {
install_dependencies
add_gpg_key
add_to_apt
install_docker
apt_install_docker
update_to_rootless
update_docker_ps_format
add_vars_to_bashrc
Expand Down
23 changes: 14 additions & 9 deletions src/frontend/public/install-fmtm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ add_to_apt() {
echo "Done"
}

install_docker() {
apt_install_docker() {
pretty_echo "Installing Docker"
sudo apt-get update
sudo apt-get install -y \
Expand Down Expand Up @@ -158,13 +158,13 @@ install_docker() {

read -rp "Do you want to install Docker? (y/n): " install_docker

if [["$install_docker" == "y" || "$install_docker" == "yes"]]; then
if [[ "$install_docker" == "y" || "$install_docker" == "yes" ]]; then
check_os
remove_old_docker_installs
install_dependencies
add_gpg_key
add_to_apt
install_docker
apt_install_docker
update_to_rootless
update_docker_ps_format
add_vars_to_bashrc
Expand Down Expand Up @@ -200,17 +200,18 @@ check_existing_dotenv() {
read -e -p "Do you want to overwrite it? y/n " conf
if [ "$conf" = "y" ]
then
conf=""
break
return 1
elif [ "$conf" = "n" ]
then
echo "Aborting."
exit 0
echo "Continuing with existing .env file."
return 0
else
echo "Invalid input!"
fi
done
fi

return 1
}

check_debug() {
Expand Down Expand Up @@ -488,9 +489,12 @@ generate_dotenv() {

prompt_user_for_dotenv() {
pretty_echo "Generate dotenv config for FMTM"
check_existing_dotenv

if check_existing_dotenv; then
return # Exit the function
fi

install_envsubst_if_missing
check_debug

if [ $IS_DEBUG != true ]; then
set_deploy_env
Expand Down Expand Up @@ -555,6 +559,7 @@ run_compose_stack() {


install_docker
check_debug
get_repo_or_mkdir
prompt_user_for_dotenv
run_compose_stack

0 comments on commit 0021803

Please sign in to comment.