From c7d1cf634ecb2f4067cdb7e595ef89d4b69b2168 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Thu, 28 Sep 2023 00:57:22 +0300 Subject: [PATCH] fix printing --- .sample/run.sh | 2 +- code-server/run.sh | 4 ++-- filebrowser/run.sh | 2 +- jfrog/run.sh | 10 +++++----- jupyter-notebook/run.sh | 2 +- jupyterlab/run.sh | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.sample/run.sh b/.sample/run.sh index 79eb123..2f8fae1 100755 --- a/.sample/run.sh +++ b/.sample/run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh BOLD='\033[0;1m' -echo "$${BOLD}Installing MODULE_NAME..." +printf "$${BOLD}Installing MODULE_NAME..." # Add code here # Use varibles from the templatefile function in main.tf # e.g. LOG_PATH, PORT, etc. diff --git a/code-server/run.sh b/code-server/run.sh index 3e1a38b..6676aaa 100755 --- a/code-server/run.sh +++ b/code-server/run.sh @@ -41,9 +41,9 @@ done if [ ! -f ~/.local/share/code-server/Machine/settings.json ]; then echo "⚙️ Creating settings file..." mkdir -p ~/.local/share/code-server/Machine - echo "${SETTINGS}" > ~/.local/share/code-server/Machine/settings.json + echo "${SETTINGS}" >~/.local/share/code-server/Machine/settings.json fi echo "👷 Running code-server in the background..." echo "Check logs at ${LOG_PATH}!" -$CODE_SERVER --auth none --port ${PORT} >${LOG_PATH} 2>&1 & \ No newline at end of file +$CODE_SERVER --auth none --port ${PORT} >${LOG_PATH} 2>&1 & diff --git a/filebrowser/run.sh b/filebrowser/run.sh index 427c864..b13e919 100644 --- a/filebrowser/run.sh +++ b/filebrowser/run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh BOLD='\033[0;1m' -echo "$${BOLD}Installing filebrowser \n\n" +printf "$${BOLD}Installing filebrowser \n\n" curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash diff --git a/jfrog/run.sh b/jfrog/run.sh index 7f58114..272eb1d 100644 --- a/jfrog/run.sh +++ b/jfrog/run.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh BOLD='\033[0;1m' -echo "$${BOLD}Installing JFrog CLI..." +printf "$${BOLD}Installing JFrog CLI..." # Install the JFrog CLI. curl -fL https://install-cli.jfrog.io | sudo sh @@ -20,11 +20,11 @@ if [ -z "${REPOSITORY_NPM}" ]; then else echo "📦 Configuring npm..." jf npmc --global --repo-resolve "${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM}" - cat << EOF > ~/.npmrc + cat <~/.npmrc email = ${ARTIFACTORY_USERNAME} registry = ${JFROG_URL}/artifactory/api/npm/${REPOSITORY_NPM} EOF - jf rt curl /api/npm/auth >> ~/.npmrc + jf rt curl /api/npm/auth >>~/.npmrc fi # Configure the `pip` to use the Artifactory "python" repository. @@ -33,7 +33,7 @@ if [ -z "${REPOSITORY_PYPI}" ]; then else echo "🐍 Configuring pip..." mkdir -p ~/.pip - cat << EOF > ~/.pip/pip.conf + cat <~/.pip/pip.conf [global] index-url = https://${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}@${JFROG_HOST}/artifactory/api/pypi/${REPOSITORY_PYPI}/simple EOF @@ -46,4 +46,4 @@ else echo "🐹 Configuring go..." export GOPROXY="https://${ARTIFACTORY_USERNAME}:${ARTIFACTORY_ACCESS_TOKEN}@${JFROG_HOST}/artifactory/api/go/${REPOSITORY_GO}" fi -echo "🥳 Configuration complete!" \ No newline at end of file +echo "🥳 Configuration complete!" diff --git a/jupyter-notebook/run.sh b/jupyter-notebook/run.sh index ed683f0..1f948ab 100755 --- a/jupyter-notebook/run.sh +++ b/jupyter-notebook/run.sh @@ -2,7 +2,7 @@ BOLD='\033[0;1m' -echo "$${BOLD}Installing jupyter-notebook!\n" +printf "$${BOLD}Installing jupyter-notebook!\n" # check if jupyter-notebook is installed if ! command -v jupyter-notebook >/dev/null 2>&1; then diff --git a/jupyterlab/run.sh b/jupyterlab/run.sh index ec7c28d..8f77cac 100755 --- a/jupyterlab/run.sh +++ b/jupyterlab/run.sh @@ -2,13 +2,13 @@ BOLD='\033[0;1m' -echo "$${BOLD}Installing jupyterlab!\n" +printf "$${BOLD}Installing jupyterlab!\n" # check if jupyterlab is installed -if ! command -v jupyterlab > /dev/null 2>&1; then +if ! command -v jupyterlab >/dev/null 2>&1; then # install jupyterlab # check if python3 pip is installed - if ! command -v pip3 > /dev/null 2>&1; then + if ! command -v pip3 >/dev/null 2>&1; then echo "pip3 is not installed" echo "Please install pip3 in your Dockerfile/VM image before running this script" exit 1 @@ -22,4 +22,4 @@ fi echo "👷 Starting jupyterlab in background..." echo "check logs at ${LOG_PATH}" -$HOME/.local/bin/jupyter lab --ServerApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' >${LOG_PATH} 2>&1 & +$HOME/.local/bin/jupyter lab --ServerApp.ip='0.0.0.0' --ServerApp.port=${PORT} --no-browser --ServerApp.token='' --ServerApp.password='' >${LOG_PATH} 2>&1 &