From f4c596416781071fd2eead2084d82c9a5e38b714 Mon Sep 17 00:00:00 2001 From: linux-shell-base Date: Sat, 15 Jul 2017 21:40:36 -0500 Subject: [PATCH 01/28] install essentials script added --- README.md | 4 ++ install-essentials.sh | 127 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 README.md create mode 100755 install-essentials.sh diff --git a/README.md b/README.md new file mode 100644 index 00000000..22d09be4 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ + +A branch for install files. + +* [**install-essentials.sh**](install-essentials.sh): Install script for essential solutions from *Linux-shell-base*. diff --git a/install-essentials.sh b/install-essentials.sh new file mode 100755 index 00000000..57a65784 --- /dev/null +++ b/install-essentials.sh @@ -0,0 +1,127 @@ +#!/usr/bin/env bash +# +# Install script for essential solutions from Linux-shell-base. +# + +# ======= CONFIGURATIONS ============== + +# Directory where files will be downloaded. +readonly DOWNLOAD_DIR="${HOME}" + +# ======= ! CONFIGURATIONS ============== + +readonly MASTER_URL='https://raw.githubusercontent.com/linux-shell-base/linux-shell-base/master' +readonly ESSNTLS_DIR="${DOWNLOAD_DIR}/linux-shell-base-essentials" + +echo -e "::Downloading files to ${ESSNTLS_DIR}\n Please wait" + +[ -d "${ESSNTLS_DIR}" ] && rm -Rf "${ESSNTLS_DIR}" +mkdir -p "${ESSNTLS_DIR}" + +exec 3>&1 4>&2; exec >/dev/null 2>&1 # redirect all output to /dev/null + +# ============================================ +# Solutions from bin/ +# ============================================ + +mkdir "${ESSNTLS_DIR}/bin" + +path='/bin/bash_utilities' +wget -P "${ESSNTLS_DIR}${path}" -i - <&3 2>&4 # redirect all output back to /dev/tty +echo '::Finished' + From 56862f067b57060a75495b7d7cd4799613849c0b Mon Sep 17 00:00:00 2001 From: linux-shell-base Date: Mon, 9 Oct 2017 10:52:14 -0500 Subject: [PATCH 02/28] Make necessary changes to install-essentials.sh based on changes in the master branch --- README.md | 2 +- install-essentials.sh | 38 +++++++++++++++----------------------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 22d09be4..38751260 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ A branch for install files. -* [**install-essentials.sh**](install-essentials.sh): Install script for essential solutions from *Linux-shell-base*. +* [**install-essentials.sh**](install-essentials.sh): Install script for essential solutions in *Linux-shell-base*. diff --git a/install-essentials.sh b/install-essentials.sh index 57a65784..f3c727fc 100755 --- a/install-essentials.sh +++ b/install-essentials.sh @@ -1,11 +1,11 @@ #!/usr/bin/env bash # -# Install script for essential solutions from Linux-shell-base. +# Install script for essential solutions in Linux-shell-base. # # ======= CONFIGURATIONS ============== -# Directory where files will be downloaded. +# Directory where files will be downloaded readonly DOWNLOAD_DIR="${HOME}" # ======= ! CONFIGURATIONS ============== @@ -21,12 +21,12 @@ mkdir -p "${ESSNTLS_DIR}" exec 3>&1 4>&2; exec >/dev/null 2>&1 # redirect all output to /dev/null # ============================================ -# Solutions from bin/ +# Scripts # ============================================ mkdir "${ESSNTLS_DIR}/bin" -path='/bin/bash_utilities' +path='/bin/bash' wget -P "${ESSNTLS_DIR}${path}" -i - <&3 2>&4 # redirect all output back to /dev/tty From 6583fd95005ba255743c843776b8d0a118d37986 Mon Sep 17 00:00:00 2001 From: linux-shell-base Date: Sun, 15 Oct 2017 17:41:09 -0500 Subject: [PATCH 03/28] Changes bin/ directory references to scripts/ --- install-essentials.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install-essentials.sh b/install-essentials.sh index f3c727fc..c5190f33 100755 --- a/install-essentials.sh +++ b/install-essentials.sh @@ -26,7 +26,7 @@ exec 3>&1 4>&2; exec >/dev/null 2>&1 # redirect all output to /dev/null mkdir "${ESSNTLS_DIR}/bin" -path='/bin/bash' +path='/scripts/bash' wget -P "${ESSNTLS_DIR}${path}" -i - < Date: Mon, 16 Oct 2017 17:52:09 -0500 Subject: [PATCH 04/28] Make changes based on file name and directory structure updates --- install-essentials.sh | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/install-essentials.sh b/install-essentials.sh index c5190f33..13be8016 100755 --- a/install-essentials.sh +++ b/install-essentials.sh @@ -24,9 +24,9 @@ exec 3>&1 4>&2; exec >/dev/null 2>&1 # redirect all output to /dev/null # Scripts # ============================================ -mkdir "${ESSNTLS_DIR}/bin" +mkdir "${ESSNTLS_DIR}/scripts" -path='/scripts/bash' +path='/scripts/programming_languages/bash' wget -P "${ESSNTLS_DIR}${path}" -i - <&3 2>&4 # redirect all output back to /dev/tty From 75f29fb5fff062b22359367ef84faf1b969061b0 Mon Sep 17 00:00:00 2001 From: linux-shell-base Date: Wed, 18 Oct 2017 08:25:31 -0500 Subject: [PATCH 05/28] Move logic to function in install-essentials.sh --- README.md | 2 +- install-essentials.sh | 183 ++++++++++++++++++++++-------------------- 2 files changed, 96 insertions(+), 89 deletions(-) diff --git a/README.md b/README.md index 38751260..22d09be4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ A branch for install files. -* [**install-essentials.sh**](install-essentials.sh): Install script for essential solutions in *Linux-shell-base*. +* [**install-essentials.sh**](install-essentials.sh): Install script for essential solutions from *Linux-shell-base*. diff --git a/install-essentials.sh b/install-essentials.sh index 13be8016..43e69ef9 100755 --- a/install-essentials.sh +++ b/install-essentials.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Install script for essential solutions in Linux-shell-base. +# Install script for essential solutions from Linux-shell-base. # # ======= CONFIGURATIONS ============== @@ -11,110 +11,117 @@ readonly DOWNLOAD_DIR="${HOME}" # ======= ! CONFIGURATIONS ============== readonly MASTER_URL='https://raw.githubusercontent.com/linux-shell-base/linux-shell-base/master' -readonly ESSNTLS_DIR="${DOWNLOAD_DIR}/linux-shell-base-essentials" +readonly LSB_ESSNTLS_DIR="${DOWNLOAD_DIR}/linux-shell-base-essentials" -echo -e "::Downloading files to ${ESSNTLS_DIR}\n Please wait" +echo -e "::Downloading files to ${LSB_ESSNTLS_DIR}\n Please wait" -[ -d "${ESSNTLS_DIR}" ] && rm -Rf "${ESSNTLS_DIR}" -mkdir -p "${ESSNTLS_DIR}" +[ -d "${LSB_ESSNTLS_DIR}" ] && rm -Rf "${LSB_ESSNTLS_DIR}" +mkdir -p "${LSB_ESSNTLS_DIR}" exec 3>&1 4>&2; exec >/dev/null 2>&1 # redirect all output to /dev/null # ============================================ -# Scripts +# Utility functions # ============================================ -mkdir "${ESSNTLS_DIR}/scripts" - -path='/scripts/programming_languages/bash' -wget -P "${ESSNTLS_DIR}${path}" -i - < +mwget() { + for fileNameArg in "${@: 2}"; do + local filesList+="${fileNameArg} " + local wgetFilesList+="${MASTER_URL}${1}/${fileNameArg}"$'\n' + done + wget -P "${LSB_ESSNTLS_DIR}${1}" -i - <<-EOF + ${wgetFilesList} + EOF + cd "${LSB_ESSNTLS_DIR}${1}" + for file in ${filesList}; do + if [ -n "${file##*.*}" ]; then + chmod +x "${file}" + fi + done +} # ============================================ -# Aliases and short functions +# Solutions - Scripts # ============================================ -path='/aliases' -wget -P "${ESSNTLS_DIR}${path}" -i - <&3 2>&4 # redirect all output back to /dev/tty echo '::Finished' From 18a59e7bb7a9e880b8e44c0b1fb7f4d43fb85bec Mon Sep 17 00:00:00 2001 From: linux-shell-base Date: Mon, 30 Oct 2017 10:26:13 -0500 Subject: [PATCH 06/28] Update solution paths in install-essentials.sh --- install-essentials.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/install-essentials.sh b/install-essentials.sh index 43e69ef9..8e622888 100755 --- a/install-essentials.sh +++ b/install-essentials.sh @@ -50,9 +50,6 @@ mwget() { mwget '/scripts/linux-modules/shell_management' \ 'runinbg'; -mwget '/scripts/linux-modules/file_management' \ - 'returnfileforcmd'; - mwget '/scripts/linux-output_only-single-value/hardware_management' \ 'issecondarywlanblocked' \ 'iswlanblocked'; @@ -79,14 +76,17 @@ mwget '/scripts/linux-output_only-single-value/x11' \ 'getwindpidbyid' \ 'iswindopen'; -mwget '/scripts/utilities-primary/program_management' \ +mwget '/scripts/utilities-main/general_program_management' \ 'newterm'; -mwget '/scripts/utilities-primary/keybind' \ +mwget '/scripts/utilities-main/general_text_manipulation' \ + 'reprec'; + +mwget '/scripts/utilities-main/keybind' \ 'termcommand'; -mwget '/scripts/utilities-primary/text_manipulation' \ - 'reprec'; +mwget '/scripts/utilities-modules/general_program_management' \ + 'returnfileforcmd'; # ============================================ # Solutions - Functions @@ -110,7 +110,7 @@ mwget '/aliases' \ 'aliases-linux-without_output.bash' \ 'aliases-linux-output_only-multi-value.bash' \ 'aliases-linux-output_only-single-value.bash' \ - 'aliases-utilities-primary.bash'; + 'aliases-utilities-main.bash'; # ============================================ # Solutions - One-liners From b9ea2281094d5d5df419f58fb36eb5fbe970860a Mon Sep 17 00:00:00 2001 From: linux-shell-base Date: Wed, 8 Nov 2017 23:10:41 -0600 Subject: [PATCH 07/28] Change reference path functions/ to functions_scripts/ --- install-essentials.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-essentials.sh b/install-essentials.sh index 8e622888..8db463b7 100755 --- a/install-essentials.sh +++ b/install-essentials.sh @@ -92,7 +92,7 @@ mwget '/scripts/utilities-modules/general_program_management' \ # Solutions - Functions # ============================================ -mwget '/functions/programming_languages/bash' \ +mwget '/functions_scripts/programming_languages/bash' \ 'arrayutils.bash' \ 'coreutils.bash' \ 'dateandtimeutils.bash' \ From 3a38679c428ee96bd391ce249a4a4bd5e09fed3d Mon Sep 17 00:00:00 2001 From: linux-shell-base Date: Sat, 25 Nov 2017 17:12:13 -0600 Subject: [PATCH 08/28] Rename install-essentials.sh to download-essentials.sh --- install-essentials.sh => download-essentials.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename install-essentials.sh => download-essentials.sh (100%) diff --git a/install-essentials.sh b/download-essentials.sh similarity index 100% rename from install-essentials.sh rename to download-essentials.sh From 5ebc951f3afeffe71e308d0444b5b629e0348ed8 Mon Sep 17 00:00:00 2001 From: unixfoundation Date: Sun, 3 Dec 2017 17:47:54 -0600 Subject: [PATCH 09/28] Update download-essentials.sh and rename it to download-Shell-essentials.sh --- download-essentials.sh => download-Shell-essentials.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename download-essentials.sh => download-Shell-essentials.sh (93%) diff --git a/download-essentials.sh b/download-Shell-essentials.sh similarity index 93% rename from download-essentials.sh rename to download-Shell-essentials.sh index 8db463b7..53a56223 100755 --- a/download-essentials.sh +++ b/download-Shell-essentials.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Install script for essential solutions from Linux-shell-base. +# Script to download essential solutions from Shell. # # ======= CONFIGURATIONS ============== @@ -10,8 +10,8 @@ readonly DOWNLOAD_DIR="${HOME}" # ======= ! CONFIGURATIONS ============== -readonly MASTER_URL='https://raw.githubusercontent.com/linux-shell-base/linux-shell-base/master' -readonly LSB_ESSNTLS_DIR="${DOWNLOAD_DIR}/linux-shell-base-essentials" +readonly MASTER_URL='https://raw.githubusercontent.com/unix-foundation/shell/master' +readonly LSB_ESSNTLS_DIR="${DOWNLOAD_DIR}/shell-essentials" echo -e "::Downloading files to ${LSB_ESSNTLS_DIR}\n Please wait" From 77fa9c61cc85287066abfb0d837707cc2a57b92b Mon Sep 17 00:00:00 2001 From: unixfoundation Date: Sun, 3 Dec 2017 17:50:39 -0600 Subject: [PATCH 10/28] Remove link to download-essentials.sh in README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 22d09be4..d45a987d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,2 @@ -A branch for install files. - -* [**install-essentials.sh**](install-essentials.sh): Install script for essential solutions from *Linux-shell-base*. +A branch for download files From 509fccd464e819b44702dfcafa649cd92ebedb0c Mon Sep 17 00:00:00 2001 From: unixfoundation Date: Sun, 3 Dec 2017 21:17:08 -0600 Subject: [PATCH 11/28] Change solutions section "linux" to "gnu-linux" in download-Shell-essentials.sh --- download-Shell-essentials.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/download-Shell-essentials.sh b/download-Shell-essentials.sh index 53a56223..4fc9640a 100755 --- a/download-Shell-essentials.sh +++ b/download-Shell-essentials.sh @@ -47,18 +47,18 @@ mwget() { # Solutions - Scripts # ============================================ -mwget '/scripts/linux-modules/shell_management' \ +mwget '/scripts/gnu-linux-modules/shell_management' \ 'runinbg'; -mwget '/scripts/linux-output_only-single-value/hardware_management' \ +mwget '/scripts/gnu-linux-output_only-single-value/hardware_management' \ 'issecondarywlanblocked' \ 'iswlanblocked'; -mwget '/scripts/linux-output_only-single-value/network_management' \ +mwget '/scripts/gnu-linux-output_only-single-value/network_management' \ 'connectedtointernet' \ 'connectedtonetwork'; -mwget '/scripts/linux-output_only-single-value/x11' \ +mwget '/scripts/gnu-linux-output_only-single-value/x11' \ 'getactvwindclass' \ 'getactvwindid' \ 'getactvwindname' \ @@ -106,10 +106,10 @@ mwget '/functions_scripts/programming_languages/bash' \ # ============================================ mwget '/aliases' \ - 'aliases-linux-with_output.bash' \ - 'aliases-linux-without_output.bash' \ - 'aliases-linux-output_only-multi-value.bash' \ - 'aliases-linux-output_only-single-value.bash' \ + 'aliases-gnu-linux-with_output.bash' \ + 'aliases-gnu-linux-without_output.bash' \ + 'aliases-gnu-linux-output_only-multi-value.bash' \ + 'aliases-gnu-linux-output_only-single-value.bash' \ 'aliases-utilities-main.bash'; # ============================================ @@ -117,7 +117,7 @@ mwget '/aliases' \ # ============================================ mwget '/one-liners' \ - 'one-liners-linux-output_only-single-value.bash'; + 'one-liners-gnu-linux-output_only-single-value.bash'; # ============================================ # Finish From 8e524722b3c7f04f5ef3863a67b658e002056329 Mon Sep 17 00:00:00 2001 From: unix-foundation Date: Mon, 4 Dec 2017 12:02:28 -0600 Subject: [PATCH 12/28] Update account name in download-Shell-essentials.sh --- download-Shell-essentials.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download-Shell-essentials.sh b/download-Shell-essentials.sh index 4fc9640a..9566d0a7 100755 --- a/download-Shell-essentials.sh +++ b/download-Shell-essentials.sh @@ -10,7 +10,7 @@ readonly DOWNLOAD_DIR="${HOME}" # ======= ! CONFIGURATIONS ============== -readonly MASTER_URL='https://raw.githubusercontent.com/unix-foundation/shell/master' +readonly MASTER_URL='https://raw.githubusercontent.com/unixfoundation/shell/master' readonly LSB_ESSNTLS_DIR="${DOWNLOAD_DIR}/shell-essentials" echo -e "::Downloading files to ${LSB_ESSNTLS_DIR}\n Please wait" From e6ba2d9f3366a3c31dc90a98389814e2f5e66cb3 Mon Sep 17 00:00:00 2001 From: unix-foundation Date: Mon, 4 Dec 2017 12:14:19 -0600 Subject: [PATCH 13/28] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d45a987d..0b41635e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -A branch for download files +A branch for download scripts From 9c30d7ba0c4bc3ec2f8aaef2f813adb689f9cddb Mon Sep 17 00:00:00 2001 From: unix-foundation Date: Wed, 6 Dec 2017 10:13:04 -0600 Subject: [PATCH 14/28] Update solutions names in download-Shell-essentials.sh --- download-Shell-essentials.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/download-Shell-essentials.sh b/download-Shell-essentials.sh index 9566d0a7..08f3c4c3 100755 --- a/download-Shell-essentials.sh +++ b/download-Shell-essentials.sh @@ -11,12 +11,12 @@ readonly DOWNLOAD_DIR="${HOME}" # ======= ! CONFIGURATIONS ============== readonly MASTER_URL='https://raw.githubusercontent.com/unixfoundation/shell/master' -readonly LSB_ESSNTLS_DIR="${DOWNLOAD_DIR}/shell-essentials" +readonly BASE_DIR="${DOWNLOAD_DIR}/shell-essentials" -echo -e "::Downloading files to ${LSB_ESSNTLS_DIR}\n Please wait" +echo -e "::Downloading files to ${BASE_DIR}\n Please wait" -[ -d "${LSB_ESSNTLS_DIR}" ] && rm -Rf "${LSB_ESSNTLS_DIR}" -mkdir -p "${LSB_ESSNTLS_DIR}" +[ -d "${BASE_DIR}" ] && rm -Rf "${BASE_DIR}" +mkdir -p "${BASE_DIR}" exec 3>&1 4>&2; exec >/dev/null 2>&1 # redirect all output to /dev/null @@ -32,10 +32,10 @@ mwget() { local filesList+="${fileNameArg} " local wgetFilesList+="${MASTER_URL}${1}/${fileNameArg}"$'\n' done - wget -P "${LSB_ESSNTLS_DIR}${1}" -i - <<-EOF + wget -P "${BASE_DIR}${1}" -i - <<-EOF ${wgetFilesList} EOF - cd "${LSB_ESSNTLS_DIR}${1}" + cd "${BASE_DIR}${1}" for file in ${filesList}; do if [ -n "${file##*.*}" ]; then chmod +x "${file}" @@ -77,16 +77,16 @@ mwget '/scripts/gnu-linux-output_only-single-value/x11' \ 'iswindopen'; mwget '/scripts/utilities-main/general_program_management' \ - 'newterm'; + 'opennewterm'; mwget '/scripts/utilities-main/general_text_manipulation' \ - 'reprec'; + 'replrec'; mwget '/scripts/utilities-main/keybind' \ - 'termcommand'; + 'exectermcommand'; mwget '/scripts/utilities-modules/general_program_management' \ - 'returnfileforcmd'; + 'retfileforcmd'; # ============================================ # Solutions - Functions From 142004271ba686613fa7c77fc6a9e8a32070b65f Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Fri, 8 Dec 2017 17:16:04 -0600 Subject: [PATCH 15/28] Split retfileforcmd to findfileforcmd and locfileforcmd in download-Shell-essentials.sh --- download-Shell-essentials.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/download-Shell-essentials.sh b/download-Shell-essentials.sh index 08f3c4c3..bc5aee62 100755 --- a/download-Shell-essentials.sh +++ b/download-Shell-essentials.sh @@ -86,7 +86,8 @@ mwget '/scripts/utilities-main/keybind' \ 'exectermcommand'; mwget '/scripts/utilities-modules/general_program_management' \ - 'retfileforcmd'; + 'findfileforcmd' \ + 'locfileforcmd'; # ============================================ # Solutions - Functions From 346084339192f0e5744e7eb0ed4d422a77c0261d Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Sat, 9 Dec 2017 16:15:11 -0600 Subject: [PATCH 16/28] Add execlasttermcommand in download-Shell-essentials.sh --- download-Shell-essentials.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/download-Shell-essentials.sh b/download-Shell-essentials.sh index bc5aee62..c6a82ad7 100755 --- a/download-Shell-essentials.sh +++ b/download-Shell-essentials.sh @@ -83,6 +83,7 @@ mwget '/scripts/utilities-main/general_text_manipulation' \ 'replrec'; mwget '/scripts/utilities-main/keybind' \ + 'execlasttermcommand' \ 'exectermcommand'; mwget '/scripts/utilities-modules/general_program_management' \ From 3c44657917f578e952c550c3ad03b5c29738f8c3 Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Mon, 11 Dec 2017 10:58:24 -0600 Subject: [PATCH 17/28] Update README.md for branch name change --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b41635e..423592b1 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -A branch for download scripts +A branch for helper scripts From 857f92d31e60a30fb274c509e2240859e88cb0a4 Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Mon, 11 Dec 2017 11:02:27 -0600 Subject: [PATCH 18/28] Add view-Shell-aliases.sh --- view-Shell-aliases.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 view-Shell-aliases.sh diff --git a/view-Shell-aliases.sh b/view-Shell-aliases.sh new file mode 100755 index 00000000..87879f7f --- /dev/null +++ b/view-Shell-aliases.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# +# A script for printing the content of all aliases files. +# +# Usage note: +# To use, cd to the aliases directory and run. +# + +if [ "$(echo "$PWD" | sed 's/.*\///')" != 'aliases' ]; then + echo "$(basename "${BASH_SOURCE[0]}"): not in directory \"aliases\"" + exit 1 +fi + +for filePath in $(find . -type f -name '*.aliases*'); do + basePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-2)}')" + if [ "${basePath}" != "${prevBasePath}" ]; then + echo '============================================' + echo -e " ${basePath}/" + echo -e '============================================\n' + fi + prevBasePath="${basePath}" + + fileBasePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-1),$(NF)}' | sed \ + 's/ /\//')" + echo -e "----- ${fileBasePath}" + tail -n +5 "${filePath}" +done + From 47ccf02c5675659dd86ac09c3e0a0e360bc4fab1 Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Mon, 11 Dec 2017 11:54:58 -0600 Subject: [PATCH 19/28] Add view-Shell-one-liners.sh --- view-Shell-one-liners.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 view-Shell-one-liners.sh diff --git a/view-Shell-one-liners.sh b/view-Shell-one-liners.sh new file mode 100755 index 00000000..3d701f11 --- /dev/null +++ b/view-Shell-one-liners.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash +# +# A script for printing the content of all one-liners files. +# +# Usage note: +# To use, cd to the one-liners directory and run. +# + +if [ "$(echo "$PWD" | sed 's/.*\///')" != 'one-liners' ]; then + echo "$(basename "${BASH_SOURCE[0]}"): not in directory \"one-liners\"" + exit 1 +fi + +for filePath in $(find . -type f -name '*.one-liners*'); do + basePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-2)}')" + if [ "${basePath}" != "${prevBasePath}" ]; then + echo '============================================' + echo -e " ${basePath}/" + echo -e '============================================\n' + fi + prevBasePath="${basePath}" + + fileBasePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-1),$(NF)}' | sed \ + 's/ /\//')" + echo -e "----- ${fileBasePath}" + tail -n +5 "${filePath}" +done + From 5bf6926b2216d5a2069b8b67762e8edc22261310 Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Mon, 11 Dec 2017 13:41:34 -0600 Subject: [PATCH 20/28] Add view-Shell-scripts.sh --- view-Shell-scripts.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 view-Shell-scripts.sh diff --git a/view-Shell-scripts.sh b/view-Shell-scripts.sh new file mode 100755 index 00000000..eb9af60b --- /dev/null +++ b/view-Shell-scripts.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# +# A script for printing the name and description of all scripts. +# +# Usage note: +# To use, cd to the scripts directory and run. +# + +if [ "$(echo "$PWD" | sed 's/.*\///')" != 'scripts' ]; then + echo "$(basename "${BASH_SOURCE[0]}"): not in directory \"scripts\"" + exit 1 +fi + +for filePath in $(find . -type f ! -name '*.*'); do + basePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-2)}')" + if [ "${basePath}" != "${prevBasePath}" ]; then + echo '============================================' + echo -e " ${basePath}/" + echo -e '============================================\n' + fi + prevBasePath="${basePath}" + + fileBasePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-1),$(NF)}' | \ + sed 's/ /\//')" + scriptDescription="$(cat "${filePath}" | \ + awk '/^(#[ ])$/ {for(i=1; i<=3; i++) {getline; print}; exit}' | \ + awk '{$1=""; print substr($0,2)}' | grep -Ev '^$|[:]')" + echo -e "----- ${fileBasePath}:\n${scriptDescription}\n" +done + From 365d23fa5331ada875dfda773d8a22616b254fb8 Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Tue, 12 Dec 2017 11:12:15 -0600 Subject: [PATCH 21/28] Add view-Shell-functions-scripts.sh --- view-Shell-functions-scripts.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 view-Shell-functions-scripts.sh diff --git a/view-Shell-functions-scripts.sh b/view-Shell-functions-scripts.sh new file mode 100755 index 00000000..0a36360a --- /dev/null +++ b/view-Shell-functions-scripts.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# +# A script for printing the name and description of all functions scripts. +# +# Usage note: +# To use, cd to the functions_scripts directory and run. +# + +if [ "$(echo "$PWD" | sed 's/.*\///')" != 'functions_scripts' ]; then + echo "$(basename "${BASH_SOURCE[0]}"): not in directory \"functions_scripts\"" + exit 1 +fi + +for filePath in $(find . -type f ! -name '*.*' -o -name '*.bash'); do + basePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-2)}')" + if [ "${basePath}" != "${prevBasePath}" ]; then + echo '============================================' + echo -e " ${basePath}/" + echo -e '============================================\n' + fi + prevBasePath="${basePath}" + + fileBasePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-1),$(NF)}' | \ + sed 's/ /\//')" + scriptDescription="$(cat "${filePath}" | \ + awk '/^(#[ ])$/ {for(i=1; i<=3; i++) {getline; print}; exit}' | \ + awk '{$1=""; print substr($0,2)}' | grep -Ev '^$|[:]')" + echo -e "----- ${fileBasePath}:\n${scriptDescription}\n" +done + From 5ac048f082a5a941c32aace8ee06f550e3292c0f Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Tue, 12 Dec 2017 14:09:51 -0600 Subject: [PATCH 22/28] Update view scripts for documentation changes in solutions --- view-Shell-aliases.sh | 2 +- view-Shell-functions-scripts.sh | 6 +++--- view-Shell-one-liners.sh | 2 +- view-Shell-scripts.sh | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/view-Shell-aliases.sh b/view-Shell-aliases.sh index 87879f7f..2606da2f 100755 --- a/view-Shell-aliases.sh +++ b/view-Shell-aliases.sh @@ -23,6 +23,6 @@ for filePath in $(find . -type f -name '*.aliases*'); do fileBasePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-1),$(NF)}' | sed \ 's/ /\//')" echo -e "----- ${fileBasePath}" - tail -n +5 "${filePath}" + tail -n +8 "${filePath}" done diff --git a/view-Shell-functions-scripts.sh b/view-Shell-functions-scripts.sh index 0a36360a..1068fee2 100755 --- a/view-Shell-functions-scripts.sh +++ b/view-Shell-functions-scripts.sh @@ -23,8 +23,8 @@ for filePath in $(find . -type f ! -name '*.*' -o -name '*.bash'); do fileBasePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-1),$(NF)}' | \ sed 's/ /\//')" scriptDescription="$(cat "${filePath}" | \ - awk '/^(#[ ])$/ {for(i=1; i<=3; i++) {getline; print}; exit}' | \ - awk '{$1=""; print substr($0,2)}' | grep -Ev '^$|[:]')" - echo -e "----- ${fileBasePath}:\n${scriptDescription}\n" + awk '/^(#[ ]Description)/ {for(i=1; i<=3; i++) {getline; print}; exit}' \ + | awk '{$1=""; print substr($0,2)}' | grep -Ev '^$|[:]')" + echo -e "----- ${fileBasePath}:\n\n${scriptDescription}\n" done diff --git a/view-Shell-one-liners.sh b/view-Shell-one-liners.sh index 3d701f11..d2bd25a6 100755 --- a/view-Shell-one-liners.sh +++ b/view-Shell-one-liners.sh @@ -23,6 +23,6 @@ for filePath in $(find . -type f -name '*.one-liners*'); do fileBasePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-1),$(NF)}' | sed \ 's/ /\//')" echo -e "----- ${fileBasePath}" - tail -n +5 "${filePath}" + tail -n +8 "${filePath}" done diff --git a/view-Shell-scripts.sh b/view-Shell-scripts.sh index eb9af60b..3cf5434e 100755 --- a/view-Shell-scripts.sh +++ b/view-Shell-scripts.sh @@ -23,8 +23,8 @@ for filePath in $(find . -type f ! -name '*.*'); do fileBasePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-1),$(NF)}' | \ sed 's/ /\//')" scriptDescription="$(cat "${filePath}" | \ - awk '/^(#[ ])$/ {for(i=1; i<=3; i++) {getline; print}; exit}' | \ - awk '{$1=""; print substr($0,2)}' | grep -Ev '^$|[:]')" + awk '/^(#[ ]Description)/ {for(i=1; i<=3; i++) {getline; print}; exit}' \ + | awk '{$1=""; print substr($0,2)}' | grep -Ev '^$|[:]')" echo -e "----- ${fileBasePath}:\n${scriptDescription}\n" done From ca802758935e0c78ee76ebe70833f0bdc6a87b8c Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Sun, 21 Jan 2018 11:57:25 -0600 Subject: [PATCH 23/28] Update and rename all view scripts --- view-Shell-aliases.sh => view-shell-aliases.sh | 10 +++++++--- ...tions-scripts.sh => view-shell-functions-scripts.sh | 10 +++++++--- view-Shell-one-liners.sh => view-shell-one-liners.sh | 10 +++++++--- view-Shell-scripts.sh => view-shell-scripts.sh | 10 +++++++--- 4 files changed, 28 insertions(+), 12 deletions(-) rename view-Shell-aliases.sh => view-shell-aliases.sh (74%) rename view-Shell-functions-scripts.sh => view-shell-functions-scripts.sh (77%) rename view-Shell-one-liners.sh => view-shell-one-liners.sh (75%) rename view-Shell-scripts.sh => view-shell-scripts.sh (80%) diff --git a/view-Shell-aliases.sh b/view-shell-aliases.sh similarity index 74% rename from view-Shell-aliases.sh rename to view-shell-aliases.sh index 2606da2f..24e41785 100755 --- a/view-Shell-aliases.sh +++ b/view-shell-aliases.sh @@ -1,13 +1,17 @@ #!/usr/bin/env bash # -# A script for printing the content of all aliases files. +# File: +# view-shell-aliases.sh +# +# Description: +# View all aliases and short functions in unixfoundation/shell. # # Usage note: -# To use, cd to the aliases directory and run. +# Cd to directory "aliases/" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'aliases' ]; then - echo "$(basename "${BASH_SOURCE[0]}"): not in directory \"aliases\"" + echo 'view-shell-aliases.sh: not in directory "aliases/"' exit 1 fi diff --git a/view-Shell-functions-scripts.sh b/view-shell-functions-scripts.sh similarity index 77% rename from view-Shell-functions-scripts.sh rename to view-shell-functions-scripts.sh index 1068fee2..a5f0073a 100755 --- a/view-Shell-functions-scripts.sh +++ b/view-shell-functions-scripts.sh @@ -1,13 +1,17 @@ #!/usr/bin/env bash # -# A script for printing the name and description of all functions scripts. +# File: +# view-shell-functions-scripts.sh +# +# Description: +# View all functions scripts in unixfoundation/shell. # # Usage note: -# To use, cd to the functions_scripts directory and run. +# Cd to directory "functions_scripts/" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'functions_scripts' ]; then - echo "$(basename "${BASH_SOURCE[0]}"): not in directory \"functions_scripts\"" + echo 'view-shell-functions-scripts.sh: not in directory "functions_scripts/"' exit 1 fi diff --git a/view-Shell-one-liners.sh b/view-shell-one-liners.sh similarity index 75% rename from view-Shell-one-liners.sh rename to view-shell-one-liners.sh index d2bd25a6..0d78b1eb 100755 --- a/view-Shell-one-liners.sh +++ b/view-shell-one-liners.sh @@ -1,13 +1,17 @@ #!/usr/bin/env bash # -# A script for printing the content of all one-liners files. +# File: +# view-shell-one-liners.sh +# +# Description: +# View all one-liners in unixfoundation/shell. # # Usage note: -# To use, cd to the one-liners directory and run. +# Cd to directory "one-liners/" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'one-liners' ]; then - echo "$(basename "${BASH_SOURCE[0]}"): not in directory \"one-liners\"" + echo 'view-shell-one-liners.sh: not in directory "one-liners/"' exit 1 fi diff --git a/view-Shell-scripts.sh b/view-shell-scripts.sh similarity index 80% rename from view-Shell-scripts.sh rename to view-shell-scripts.sh index 3cf5434e..e76c6451 100755 --- a/view-Shell-scripts.sh +++ b/view-shell-scripts.sh @@ -1,13 +1,17 @@ #!/usr/bin/env bash # -# A script for printing the name and description of all scripts. +# File: +# view-shell-scripts.sh +# +# Description: +# View all scripts in unixfoundation/shell. # # Usage note: -# To use, cd to the scripts directory and run. +# Cd to directory "scripts/" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'scripts' ]; then - echo "$(basename "${BASH_SOURCE[0]}"): not in directory \"scripts\"" + echo 'view-shell-scripts.sh: not in directory "scripts/"' exit 1 fi From 2c3c774b24ecd610f1b85df142b678ae81c73155 Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Sun, 21 Jan 2018 11:58:10 -0600 Subject: [PATCH 24/28] Update and rename download-Shell-essentials.sh --- ...d-Shell-essentials.sh => download-shell-essentials.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) rename download-Shell-essentials.sh => download-shell-essentials.sh (94%) diff --git a/download-Shell-essentials.sh b/download-shell-essentials.sh similarity index 94% rename from download-Shell-essentials.sh rename to download-shell-essentials.sh index c6a82ad7..0a41c511 100755 --- a/download-Shell-essentials.sh +++ b/download-shell-essentials.sh @@ -1,6 +1,13 @@ #!/usr/bin/env bash # -# Script to download essential solutions from Shell. +# File: +# download-shell-essentials.sh +# +# Description: +# Download essential solutions from unixfoundation/shell. +# +# Note: +# 01/21/18: This script is no longer in use and may not work. # # ======= CONFIGURATIONS ============== From d7998c15c37aed2370c16e05cd10e9abb0ff0cc4 Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Wed, 24 Jan 2018 21:04:58 -0600 Subject: [PATCH 25/28] Rename and update all view scripts for organization and repository name changes --- view-shell-aliases.sh => cf-gpc-view-aliases.sh | 10 ++++++---- ...ns-scripts.sh => cf-gpc-view-functions-scripts.sh | 12 +++++++----- ...-shell-one-liners.sh => cf-gpc-view-one-liners.sh | 10 ++++++---- view-shell-scripts.sh => cf-gpc-view-scripts.sh | 10 ++++++---- download-shell-essentials.sh | 4 ++-- 5 files changed, 27 insertions(+), 19 deletions(-) rename view-shell-aliases.sh => cf-gpc-view-aliases.sh (75%) rename view-shell-functions-scripts.sh => cf-gpc-view-functions-scripts.sh (72%) rename view-shell-one-liners.sh => cf-gpc-view-one-liners.sh (75%) rename view-shell-scripts.sh => cf-gpc-view-scripts.sh (80%) diff --git a/view-shell-aliases.sh b/cf-gpc-view-aliases.sh similarity index 75% rename from view-shell-aliases.sh rename to cf-gpc-view-aliases.sh index 24e41785..a763e490 100755 --- a/view-shell-aliases.sh +++ b/cf-gpc-view-aliases.sh @@ -1,22 +1,24 @@ #!/usr/bin/env bash # # File: -# view-shell-aliases.sh +# cf-gpc-view-aliases.sh # # Description: -# View all aliases and short functions in unixfoundation/shell. +# View all aliases and short functions in +# computingfoundation/general-purpose-computing. # # Usage note: -# Cd to directory "aliases/" and run. +# Cd to directory aliases/ and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'aliases' ]; then - echo 'view-shell-aliases.sh: not in directory "aliases/"' + echo 'cf-gpc-view-aliases.sh: not in directory aliases/' exit 1 fi for filePath in $(find . -type f -name '*.aliases*'); do basePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-2)}')" + if [ "${basePath}" != "${prevBasePath}" ]; then echo '============================================' echo -e " ${basePath}/" diff --git a/view-shell-functions-scripts.sh b/cf-gpc-view-functions-scripts.sh similarity index 72% rename from view-shell-functions-scripts.sh rename to cf-gpc-view-functions-scripts.sh index a5f0073a..ff9f4720 100755 --- a/view-shell-functions-scripts.sh +++ b/cf-gpc-view-functions-scripts.sh @@ -1,22 +1,24 @@ #!/usr/bin/env bash # # File: -# view-shell-functions-scripts.sh +# cf-gpc-view-functions-scripts.sh # # Description: -# View all functions scripts in unixfoundation/shell. +# View all functions scripts in +# computingfoundation/general-purpose-computing. # # Usage note: -# Cd to directory "functions_scripts/" and run. +# Cd to directory functions_scripts/ and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'functions_scripts' ]; then - echo 'view-shell-functions-scripts.sh: not in directory "functions_scripts/"' + echo 'cf-gpc-view-functions-scripts.sh: not in directory functions_scripts/' exit 1 fi for filePath in $(find . -type f ! -name '*.*' -o -name '*.bash'); do basePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-2)}')" + if [ "${basePath}" != "${prevBasePath}" ]; then echo '============================================' echo -e " ${basePath}/" @@ -29,6 +31,6 @@ for filePath in $(find . -type f ! -name '*.*' -o -name '*.bash'); do scriptDescription="$(cat "${filePath}" | \ awk '/^(#[ ]Description)/ {for(i=1; i<=3; i++) {getline; print}; exit}' \ | awk '{$1=""; print substr($0,2)}' | grep -Ev '^$|[:]')" - echo -e "----- ${fileBasePath}:\n\n${scriptDescription}\n" + echo -e "----- ${fileBasePath}:\n${scriptDescription}\n" done diff --git a/view-shell-one-liners.sh b/cf-gpc-view-one-liners.sh similarity index 75% rename from view-shell-one-liners.sh rename to cf-gpc-view-one-liners.sh index 0d78b1eb..759e3532 100755 --- a/view-shell-one-liners.sh +++ b/cf-gpc-view-one-liners.sh @@ -1,22 +1,24 @@ #!/usr/bin/env bash # # File: -# view-shell-one-liners.sh +# cf-gpc-view-one-liners.sh # # Description: -# View all one-liners in unixfoundation/shell. +# View all one-liners in +# computingfoundation/general-purpose-computing. # # Usage note: -# Cd to directory "one-liners/" and run. +# Cd to directory one-liners/ and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'one-liners' ]; then - echo 'view-shell-one-liners.sh: not in directory "one-liners/"' + echo 'cf-gpc-view-one-liners.sh: not in directory one-liners/' exit 1 fi for filePath in $(find . -type f -name '*.one-liners*'); do basePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-2)}')" + if [ "${basePath}" != "${prevBasePath}" ]; then echo '============================================' echo -e " ${basePath}/" diff --git a/view-shell-scripts.sh b/cf-gpc-view-scripts.sh similarity index 80% rename from view-shell-scripts.sh rename to cf-gpc-view-scripts.sh index e76c6451..3a5f15d8 100755 --- a/view-shell-scripts.sh +++ b/cf-gpc-view-scripts.sh @@ -1,22 +1,24 @@ #!/usr/bin/env bash # # File: -# view-shell-scripts.sh +# cf-gpc-view-scripts.sh # # Description: -# View all scripts in unixfoundation/shell. +# View all scripts in +# computingfoundation/general-purpose-computing. # # Usage note: -# Cd to directory "scripts/" and run. +# Cd to directory scripts/ and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'scripts' ]; then - echo 'view-shell-scripts.sh: not in directory "scripts/"' + echo 'cf-gpc-view-scripts.sh: not in directory scripts/' exit 1 fi for filePath in $(find . -type f ! -name '*.*'); do basePath="$(echo "${filePath}" | awk -F\/ '{print $(NF-2)}')" + if [ "${basePath}" != "${prevBasePath}" ]; then echo '============================================' echo -e " ${basePath}/" diff --git a/download-shell-essentials.sh b/download-shell-essentials.sh index 0a41c511..52944184 100755 --- a/download-shell-essentials.sh +++ b/download-shell-essentials.sh @@ -4,7 +4,7 @@ # download-shell-essentials.sh # # Description: -# Download essential solutions from unixfoundation/shell. +# Download essential solutions from computingfoundation/shell. # # Note: # 01/21/18: This script is no longer in use and may not work. @@ -17,7 +17,7 @@ readonly DOWNLOAD_DIR="${HOME}" # ======= ! CONFIGURATIONS ============== -readonly MASTER_URL='https://raw.githubusercontent.com/unixfoundation/shell/master' +readonly MASTER_URL='https://raw.githubusercontent.com/computingfoundation/shell/master' readonly BASE_DIR="${DOWNLOAD_DIR}/shell-essentials" echo -e "::Downloading files to ${BASE_DIR}\n Please wait" From 49ec1316c6cb4525ecd2aac70289d5c3838492f0 Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Wed, 24 Jan 2018 21:59:56 -0600 Subject: [PATCH 26/28] Remove download-shell-essentials.sh --- cf-gpc-view-aliases.sh | 4 +- cf-gpc-view-functions-scripts.sh | 4 +- cf-gpc-view-one-liners.sh | 4 +- cf-gpc-view-scripts.sh | 4 +- download-shell-essentials.sh | 137 ------------------------------- 5 files changed, 8 insertions(+), 145 deletions(-) delete mode 100755 download-shell-essentials.sh diff --git a/cf-gpc-view-aliases.sh b/cf-gpc-view-aliases.sh index a763e490..c132245b 100755 --- a/cf-gpc-view-aliases.sh +++ b/cf-gpc-view-aliases.sh @@ -8,11 +8,11 @@ # computingfoundation/general-purpose-computing. # # Usage note: -# Cd to directory aliases/ and run. +# Cd to directory "aliases" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'aliases' ]; then - echo 'cf-gpc-view-aliases.sh: not in directory aliases/' + echo 'cf-gpc-view-aliases.sh: not in directory "aliases"' exit 1 fi diff --git a/cf-gpc-view-functions-scripts.sh b/cf-gpc-view-functions-scripts.sh index ff9f4720..2561ac93 100755 --- a/cf-gpc-view-functions-scripts.sh +++ b/cf-gpc-view-functions-scripts.sh @@ -8,11 +8,11 @@ # computingfoundation/general-purpose-computing. # # Usage note: -# Cd to directory functions_scripts/ and run. +# Cd to directory "functions_scripts" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'functions_scripts' ]; then - echo 'cf-gpc-view-functions-scripts.sh: not in directory functions_scripts/' + echo 'cf-gpc-view-functions-scripts.sh: not in directory "functions_scripts"' exit 1 fi diff --git a/cf-gpc-view-one-liners.sh b/cf-gpc-view-one-liners.sh index 759e3532..b3eb0a2a 100755 --- a/cf-gpc-view-one-liners.sh +++ b/cf-gpc-view-one-liners.sh @@ -8,11 +8,11 @@ # computingfoundation/general-purpose-computing. # # Usage note: -# Cd to directory one-liners/ and run. +# Cd to directory "one-liners" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'one-liners' ]; then - echo 'cf-gpc-view-one-liners.sh: not in directory one-liners/' + echo 'cf-gpc-view-one-liners.sh: not in directory "one-liners"' exit 1 fi diff --git a/cf-gpc-view-scripts.sh b/cf-gpc-view-scripts.sh index 3a5f15d8..41aac2e5 100755 --- a/cf-gpc-view-scripts.sh +++ b/cf-gpc-view-scripts.sh @@ -8,11 +8,11 @@ # computingfoundation/general-purpose-computing. # # Usage note: -# Cd to directory scripts/ and run. +# Cd to directory "scripts" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'scripts' ]; then - echo 'cf-gpc-view-scripts.sh: not in directory scripts/' + echo 'cf-gpc-view-scripts.sh: not in directory "scripts"' exit 1 fi diff --git a/download-shell-essentials.sh b/download-shell-essentials.sh deleted file mode 100755 index 52944184..00000000 --- a/download-shell-essentials.sh +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/env bash -# -# File: -# download-shell-essentials.sh -# -# Description: -# Download essential solutions from computingfoundation/shell. -# -# Note: -# 01/21/18: This script is no longer in use and may not work. -# - -# ======= CONFIGURATIONS ============== - -# Directory where files will be downloaded -readonly DOWNLOAD_DIR="${HOME}" - -# ======= ! CONFIGURATIONS ============== - -readonly MASTER_URL='https://raw.githubusercontent.com/computingfoundation/shell/master' -readonly BASE_DIR="${DOWNLOAD_DIR}/shell-essentials" - -echo -e "::Downloading files to ${BASE_DIR}\n Please wait" - -[ -d "${BASE_DIR}" ] && rm -Rf "${BASE_DIR}" -mkdir -p "${BASE_DIR}" - -exec 3>&1 4>&2; exec >/dev/null 2>&1 # redirect all output to /dev/null - -# ============================================ -# Utility functions -# ============================================ - -# Run wget for the given files in the given URL and run necessary post-set-up. -# Usage: -# mwget -mwget() { - for fileNameArg in "${@: 2}"; do - local filesList+="${fileNameArg} " - local wgetFilesList+="${MASTER_URL}${1}/${fileNameArg}"$'\n' - done - wget -P "${BASE_DIR}${1}" -i - <<-EOF - ${wgetFilesList} - EOF - cd "${BASE_DIR}${1}" - for file in ${filesList}; do - if [ -n "${file##*.*}" ]; then - chmod +x "${file}" - fi - done -} - -# ============================================ -# Solutions - Scripts -# ============================================ - -mwget '/scripts/gnu-linux-modules/shell_management' \ - 'runinbg'; - -mwget '/scripts/gnu-linux-output_only-single-value/hardware_management' \ - 'issecondarywlanblocked' \ - 'iswlanblocked'; - -mwget '/scripts/gnu-linux-output_only-single-value/network_management' \ - 'connectedtointernet' \ - 'connectedtonetwork'; - -mwget '/scripts/gnu-linux-output_only-single-value/x11' \ - 'getactvwindclass' \ - 'getactvwindid' \ - 'getactvwindname' \ - 'getactvwindpid' \ - 'getfirstwindidinclass' \ - 'getfirstwindnameinclass' \ - 'getnextwindidinactvclass' \ - 'getwindclassbyid' \ - 'getwindclassbyname' \ - 'getwindidbyname' \ - 'getwindidbypid' \ - 'getwindidsinclass' \ - 'getwindnamebyid' \ - 'getwindnamesinclass' \ - 'getwindpidbyid' \ - 'iswindopen'; - -mwget '/scripts/utilities-main/general_program_management' \ - 'opennewterm'; - -mwget '/scripts/utilities-main/general_text_manipulation' \ - 'replrec'; - -mwget '/scripts/utilities-main/keybind' \ - 'execlasttermcommand' \ - 'exectermcommand'; - -mwget '/scripts/utilities-modules/general_program_management' \ - 'findfileforcmd' \ - 'locfileforcmd'; - -# ============================================ -# Solutions - Functions -# ============================================ - -mwget '/functions_scripts/programming_languages/bash' \ - 'arrayutils.bash' \ - 'coreutils.bash' \ - 'dateandtimeutils.bash' \ - 'fileanddirectoryutils.bash' \ - 'httputils.bash' \ - 'numberutils.bash' \ - 'stringutils.bash'; - -# ============================================ -# Solutions - Aliases and short functions -# ============================================ - -mwget '/aliases' \ - 'aliases-gnu-linux-with_output.bash' \ - 'aliases-gnu-linux-without_output.bash' \ - 'aliases-gnu-linux-output_only-multi-value.bash' \ - 'aliases-gnu-linux-output_only-single-value.bash' \ - 'aliases-utilities-main.bash'; - -# ============================================ -# Solutions - One-liners -# ============================================ - -mwget '/one-liners' \ - 'one-liners-gnu-linux-output_only-single-value.bash'; - -# ============================================ -# Finish -# ============================================ - -exec >&3 2>&4 # redirect all output back to /dev/tty -echo '::Finished' - From a1d149e7f4f68609717d0230347bb8bcd5244639 Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Sat, 7 Apr 2018 15:28:06 -0500 Subject: [PATCH 27/28] Update repository name in all scripts --- cf-gpc-view-aliases.sh | 6 +++--- cf-gpc-view-functions-scripts.sh | 7 +++---- cf-gpc-view-one-liners.sh | 7 +++---- cf-gpc-view-scripts.sh | 7 +++---- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/cf-gpc-view-aliases.sh b/cf-gpc-view-aliases.sh index c132245b..ebb826ec 100755 --- a/cf-gpc-view-aliases.sh +++ b/cf-gpc-view-aliases.sh @@ -1,18 +1,18 @@ #!/usr/bin/env bash # # File: -# cf-gpc-view-aliases.sh +# cf-glsu-view-aliases.sh # # Description: # View all aliases and short functions in -# computingfoundation/general-purpose-computing. +# computingfoundation/gnu-linux-shell-use. # # Usage note: # Cd to directory "aliases" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'aliases' ]; then - echo 'cf-gpc-view-aliases.sh: not in directory "aliases"' + echo 'cf-glsu-view-aliases.sh: not in directory "aliases"' exit 1 fi diff --git a/cf-gpc-view-functions-scripts.sh b/cf-gpc-view-functions-scripts.sh index 2561ac93..c079b6b3 100755 --- a/cf-gpc-view-functions-scripts.sh +++ b/cf-gpc-view-functions-scripts.sh @@ -1,18 +1,17 @@ #!/usr/bin/env bash # # File: -# cf-gpc-view-functions-scripts.sh +# cf-glsu-view-functions-scripts.sh # # Description: -# View all functions scripts in -# computingfoundation/general-purpose-computing. +# View all functions scripts in computingfoundation/gnu-linux-shell-use. # # Usage note: # Cd to directory "functions_scripts" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'functions_scripts' ]; then - echo 'cf-gpc-view-functions-scripts.sh: not in directory "functions_scripts"' + echo 'cf-glsu-view-functions-scripts.sh: not in directory "functions_scripts"' exit 1 fi diff --git a/cf-gpc-view-one-liners.sh b/cf-gpc-view-one-liners.sh index b3eb0a2a..a58d77c9 100755 --- a/cf-gpc-view-one-liners.sh +++ b/cf-gpc-view-one-liners.sh @@ -1,18 +1,17 @@ #!/usr/bin/env bash # # File: -# cf-gpc-view-one-liners.sh +# cf-glsu-view-one-liners.sh # # Description: -# View all one-liners in -# computingfoundation/general-purpose-computing. +# View all one-liners in computingfoundation/gnu-linux-shell-use. # # Usage note: # Cd to directory "one-liners" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'one-liners' ]; then - echo 'cf-gpc-view-one-liners.sh: not in directory "one-liners"' + echo 'cf-glsu-view-one-liners.sh: not in directory "one-liners"' exit 1 fi diff --git a/cf-gpc-view-scripts.sh b/cf-gpc-view-scripts.sh index 41aac2e5..315b798a 100755 --- a/cf-gpc-view-scripts.sh +++ b/cf-gpc-view-scripts.sh @@ -1,18 +1,17 @@ #!/usr/bin/env bash # # File: -# cf-gpc-view-scripts.sh +# cf-glsu-view-scripts.sh # # Description: -# View all scripts in -# computingfoundation/general-purpose-computing. +# View all scripts in computingfoundation/gnu-linux-shell-use. # # Usage note: # Cd to directory "scripts" and run. # if [ "$(echo "$PWD" | sed 's/.*\///')" != 'scripts' ]; then - echo 'cf-gpc-view-scripts.sh: not in directory "scripts"' + echo 'cf-glsu-view-scripts.sh: not in directory "scripts"' exit 1 fi From c5be15d5a24b3e6b02eb3b6e56b65eb76445116f Mon Sep 17 00:00:00 2001 From: adrianbartyczak Date: Wed, 8 Jan 2020 01:05:50 +0000 Subject: [PATCH 28/28] Change repository name in README.md --- cf-gpc-view-aliases.sh | 2 +- cf-gpc-view-functions-scripts.sh | 2 +- cf-gpc-view-one-liners.sh | 2 +- cf-gpc-view-scripts.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cf-gpc-view-aliases.sh b/cf-gpc-view-aliases.sh index ebb826ec..92ce7654 100755 --- a/cf-gpc-view-aliases.sh +++ b/cf-gpc-view-aliases.sh @@ -5,7 +5,7 @@ # # Description: # View all aliases and short functions in -# computingfoundation/gnu-linux-shell-use. +# computingfoundation/gnu-linux-shell-scripting. # # Usage note: # Cd to directory "aliases" and run. diff --git a/cf-gpc-view-functions-scripts.sh b/cf-gpc-view-functions-scripts.sh index c079b6b3..62f45c55 100755 --- a/cf-gpc-view-functions-scripts.sh +++ b/cf-gpc-view-functions-scripts.sh @@ -4,7 +4,7 @@ # cf-glsu-view-functions-scripts.sh # # Description: -# View all functions scripts in computingfoundation/gnu-linux-shell-use. +# View all functions scripts in computingfoundation/gnu-linux-shell-scripting. # # Usage note: # Cd to directory "functions_scripts" and run. diff --git a/cf-gpc-view-one-liners.sh b/cf-gpc-view-one-liners.sh index a58d77c9..4319c0d7 100755 --- a/cf-gpc-view-one-liners.sh +++ b/cf-gpc-view-one-liners.sh @@ -4,7 +4,7 @@ # cf-glsu-view-one-liners.sh # # Description: -# View all one-liners in computingfoundation/gnu-linux-shell-use. +# View all one-liners in computingfoundation/gnu-linux-shell-scripting. # # Usage note: # Cd to directory "one-liners" and run. diff --git a/cf-gpc-view-scripts.sh b/cf-gpc-view-scripts.sh index 315b798a..06dab92e 100755 --- a/cf-gpc-view-scripts.sh +++ b/cf-gpc-view-scripts.sh @@ -4,7 +4,7 @@ # cf-glsu-view-scripts.sh # # Description: -# View all scripts in computingfoundation/gnu-linux-shell-use. +# View all scripts in computingfoundation/gnu-linux-shell-scripting. # # Usage note: # Cd to directory "scripts" and run.