From bdb155847b872f2b9b057f63d5eb07531be65cf3 Mon Sep 17 00:00:00 2001 From: Slava <20563034+veaceslavdoina@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:59:09 +0200 Subject: [PATCH] Rename variable INSTALL_CIRDL to CIRDL --- README.md | 8 ++++---- index.html | 8 ++++---- install.cmd | 10 +++++----- install.sh | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index e4aed03..aa89cd3 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,12 @@ curl -s https://get.codex.storage/install.sh | VERSION=0.1.7 bash ```shell # latest codex and cirdl -curl -s https://get.codex.storage/install.sh | INSTALL_CIRDL=true bash +curl -s https://get.codex.storage/install.sh | CIRDL=true bash ``` ```shell # codex and cirdl with required libraries on Windows with msys2 -curl -s https://get.codex.storage/install.sh | INSTALL_CIRDL=true WINDOWS_LIBS=true bash +curl -s https://get.codex.storage/install.sh | CIRDL=true WINDOWS_LIBS=true bash ``` ```shell @@ -41,12 +41,12 @@ curl -sO https://get.codex.storage/install.cmd && set VERSION=0.1.7 & install.cm ```batch :: latest codex and cirdl -curl -sO https://get.codex.storage/install.cmd && set INSTALL_CIRDL=true & install.cmd +curl -sO https://get.codex.storage/install.cmd && set CIRDL=true & install.cmd ``` ```batch :: codex and cirdl without libraries -curl -sO https://get.codex.storage/install.cmd && set INSTALL_CIRDL=true & set WINDOWS_LIBS=true & install.cmd +curl -sO https://get.codex.storage/install.cmd && set CIRDL=true & set WINDOWS_LIBS=true & install.cmd ``` ```batch diff --git a/index.html b/index.html index a504ea9..1ad248a 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ # latest codex and cirdl
- curl -s https://get.codex.storage/install.sh | INSTALL_CIRDL=true bash + curl -s https://get.codex.storage/install.sh | CIRDL=true bash

@@ -46,7 +46,7 @@ # codex and cirdl with required libraries on Windows with msys2
- curl -s https://get.codex.storage/install.sh | INSTALL_CIRDL=true WINDOWS_LIBS=true bash + curl -s https://get.codex.storage/install.sh | CIRDL=true WINDOWS_LIBS=true bash


@@ -76,7 +76,7 @@ :: latest codex and cirdl
- curl -sO https://get.codex.storage/install.cmd && set INSTALL_CIRDL=true install.cmd + curl -sO https://get.codex.storage/install.cmd && set CIRDL=true install.cmd

@@ -84,7 +84,7 @@ :: codex and cirdl without libraries
- curl -sO https://get.codex.storage/install.cmd && set INSTALL_CIRDL=true & set WINDOWS_LIBS=false & install.cmd + curl -sO https://get.codex.storage/install.cmd && set CIRDL=true & set WINDOWS_LIBS=false & install.cmd

diff --git a/install.cmd b/install.cmd index 5db49ec..54532f9 100644 --- a/install.cmd +++ b/install.cmd @@ -5,7 +5,7 @@ setlocal enabledelayedexpansion :: Variables if not defined VERSION set VERSION=latest -if not defined INSTALL_CIRDL set INSTALL_CIRDL=false +if not defined CIRDL set CIRDL=false if not defined INSTALL_DIR set "INSTALL_DIR=%LOCALAPPDATA%\Codex" set CODEX_ARCHIVE_PREFIX=codex set CIRDL_ARCHIVE_PREFIX=cirdl @@ -26,14 +26,14 @@ if "%1" == "help" ( set URL=https://get.codex.storage/!SCRIPT_NAME! set "COMMAND=curl -sO !URL!" echo !COMMAND! ^&^& !SCRIPT_NAME! - echo !COMMAND! ^&^& set VERSION=0.1.7 ^& set INSTALL_CIRDL=true ^& !SCRIPT_NAME! + echo !COMMAND! ^&^& set VERSION=0.1.7 ^& set CIRDL=true ^& !SCRIPT_NAME! echo !COMMAND! ^&^& set VERSION=0.1.7 ^& set WINDOWS_LIBS=false ^& !SCRIPT_NAME! echo !COMMAND! ^&^& set VERSION=0.1.7 ^& set "INSTALL_DIR=C:\Program Files\Codex" ^& !SCRIPT_NAME! echo. echo %ESC%[93mOptions:%ESC%[%m echo - help - show this help echo - VERSION=0.1.7 - codex and cird version to install - echo - INSTALL_CIRDL=true - install cirdl + echo - CIRDL=true - install cirdl echo - "INSTALL_DIR=C:\Program Files\Codex" - directory to install binaries echo - WINDOWS_LIBS=false - download and install archive without the libs exit /b 0 @@ -89,9 +89,9 @@ if "%VERSION%" == "latest" ( set message="Computing archives and binaries names" call :show_progress %message% ::: Remove trailing spaces -for /l %%v in (1,1,100) do if "!INSTALL_CIRDL:~-1!"==" " set INSTALL_CIRDL=!INSTALL_CIRDL:~0,-1! +for /l %%v in (1,1,100) do if "!CIRDL:~-1!"==" " set CIRDL=!CIRDL:~0,-1! ::: Set variables -if "%INSTALL_CIRDL%" == "true" ( +if "%CIRDL%" == "true" ( set "ARCHIVES=%CODEX_ARCHIVE_PREFIX% %CIRDL_ARCHIVE_PREFIX%" set "BINARIES=%CODEX_BINARY_PREFIX% %CIRDL_BINARY_PREFIX%" ) else ( diff --git a/install.sh b/install.sh index c1a6d25..fb2c9bf 100644 --- a/install.sh +++ b/install.sh @@ -5,7 +5,7 @@ set -e # Variables VERSION=${VERSION:-latest} -INSTALL_CIRDL=${INSTALL_CIRDL:-false} +CIRDL=${CIRDL:-false} INSTALL_DIR=${INSTALL_DIR:-/usr/local/bin} CODEX_ARCHIVE_PREFIX="codex" CIRDL_ARCHIVE_PREFIX="cirdl" @@ -28,13 +28,13 @@ if [[ $1 == *"h"* ]] ; then \e[33mUsage:\e[0m ${COMMAND} | bash ${COMMAND} | VERSION=0.1.7 bash - ${COMMAND} | VERSION=0.1.7 INSTALL_CIRDL=true bash + ${COMMAND} | VERSION=0.1.7 CIRDL=true bash ${COMMAND} | bash -s help \e[33mOptions:\e[0m - help - show this help - VERSION=0.1.7 - codex and cird version to install - - INSTALL_CIRDL=true - install cirdl + - CIRDL=true - install cirdl - INSTALL_DIR=/usr/local/bin - directory to install binaries - WINDOWS_LIBS=true - download and install archive with libs for windows " @@ -77,8 +77,8 @@ show_progress "${message}" # Archives and binaries message="Compute archives and binaries names" show_progress "${message}" -[[ "${INSTALL_CIRDL}" == "true" ]] && ARCHIVES=("${CODEX_ARCHIVE_PREFIX}" "${CIRDL_ARCHIVE_PREFIX}") || ARCHIVES=("${CODEX_ARCHIVE_PREFIX}") -[[ "${INSTALL_CIRDL}" == "true" ]] && BINARIES=("${CODEX_BINARY_PREFIX}" "${CIRDL_BINARY_PREFIX}") || BINARIES=("${CODEX_BINARY_PREFIX}") +[[ "${CIRDL}" == "true" ]] && ARCHIVES=("${CODEX_ARCHIVE_PREFIX}" "${CIRDL_ARCHIVE_PREFIX}") || ARCHIVES=("${CODEX_ARCHIVE_PREFIX}") +[[ "${CIRDL}" == "true" ]] && BINARIES=("${CODEX_BINARY_PREFIX}" "${CIRDL_BINARY_PREFIX}") || BINARIES=("${CODEX_BINARY_PREFIX}") show_pass "${message}" # Get the current OS