From 760812c69227e7e28a4f66fb2d58a06c057bbe5a Mon Sep 17 00:00:00 2001 From: 0d0 <0d0acre@esiliati.org> Date: Tue, 25 Feb 2025 17:06:17 +0100 Subject: [PATCH] Update docs --- scripts/configure.sh | 4 +++- scripts/deploy_example.sh | 11 +++++++++++ scripts/install.sh | 11 ++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/scripts/configure.sh b/scripts/configure.sh index c6af0eb..59c4f29 100755 --- a/scripts/configure.sh +++ b/scripts/configure.sh @@ -1,6 +1,8 @@ #!/bin/bash -## Configures pre commit hook for the current repos +## Prepares the current environment: +## - Installing dependencies +## - Configuring git hooks set -e diff --git a/scripts/deploy_example.sh b/scripts/deploy_example.sh index 2d17e31..5d0680a 100755 --- a/scripts/deploy_example.sh +++ b/scripts/deploy_example.sh @@ -1,9 +1,20 @@ #!/usr/bin/bash +# This is a script for running `install.sh` +# in a remote server using SSH. +# Configure SSH_SERVER and PROJECT_ROOT variables +# for using this script. + +###### ATTENTION ###### +# The install.sh script has a confirmation prompt +# because it deletes the content of the PROJECT_ROOT folder, +# just put "yes | install.sh" to automatically confirm. + __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" SSH_SERVER="example" PROJECT_ROOT=example_directory + SSH_REMOTE_DIR="${SSH_SERVER}:${PROJECT_ROOT}" ssh "${SSH_SERVER}" "mkdir -p ${PROJECT_ROOT}" diff --git a/scripts/install.sh b/scripts/install.sh index 929b156..2d83a7c 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,5 +1,8 @@ #!/usr/bin/bash +### This is a script for installing the latest release +### of `scaricatore`. + PROJECT_ROOT=$1 if [ -z ${PROJECT_ROOT+x} ]; then @@ -9,7 +12,13 @@ fi mkdir -p "${PROJECT_ROOT}" cd "${PROJECT_ROOT}" || exit 1 -rm -rf ./* + +read -p "We're about to run rm -rf ${PROJECT_ROOT}/*. Are you sure?" -n 1 -r +if [[ $REPLY =~ ^[Yy]$ ]] +then + rm -rf ./* +fi + wget https://git.pweapon.org/odo/dl.emersa.it/releases/download/latest/build.tar.gz tar -xvf build.tar.gz -C . rm build.tar.gz