From 1d70677f9bc4bbe6df757e9ad2b72938fa0d2288 Mon Sep 17 00:00:00 2001 From: kake26 Date: Sat, 25 Sep 2021 23:42:47 +0200 Subject: [PATCH 1/5] Update 'README.md' Updated readme and created branches for verious types. --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d1ff1b..7961b19 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ # Bash-Stash -A collection of console based bash scripts I've written at various times. It may include scripts written in other languages. \ No newline at end of file +A collection of console based bash scripts I've written at various times. It may include scripts written in other languages. + +# Console + +These are daily use type console scripts. + +# OpenWrt + +These are designed to be used with OpenWrt for various tasks. + +Please see the read me in each branch for more info. \ No newline at end of file From f8ff3fe5b92426d2123488a7c0d58efac6f1e63b Mon Sep 17 00:00:00 2001 From: kake26 Date: Sat, 25 Sep 2021 23:43:46 +0200 Subject: [PATCH 2/5] Update 'README.md' Updated readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5d1ff1b..0e7ab5a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # Bash-Stash -A collection of console based bash scripts I've written at various times. It may include scripts written in other languages. \ No newline at end of file +# Console + +These are various useful console scripts. \ No newline at end of file From 67e3a383d79525783681ef06f9da912e0bfa9abc Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 12 Jun 2022 13:26:38 -0500 Subject: [PATCH 3/5] First working copy of autoload --- .bashrc | 18 ++++++++++++++++++ LICENSE | 0 NOTES | 0 README.md | 0 modules/moo.bash | 6 ++++++ test.bash | 23 +++++++++++++++++++++++ 6 files changed, 47 insertions(+) create mode 100755 .bashrc mode change 100644 => 100755 LICENSE mode change 100644 => 100755 NOTES mode change 100644 => 100755 README.md create mode 100755 modules/moo.bash create mode 100755 test.bash diff --git a/.bashrc b/.bashrc new file mode 100755 index 0000000..33a4e74 --- /dev/null +++ b/.bashrc @@ -0,0 +1,18 @@ +# +# ~/.bashrc +# + +# Stripped of its default items + +function autoload { + #echo "Called by $(caller): Couldn't find ${BASH_COMMAND}" + if [[ -f modules/${BASH_COMMAND}.bash ]] + then + source modules/${BASH_COMMAND}.bash + ${BASH_COMMAND} + else + echo "I can't find ${BASH_COMMAND}" + fi +} + +trap autoload ERR diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/NOTES b/NOTES old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/modules/moo.bash b/modules/moo.bash new file mode 100755 index 0000000..2f0ffc8 --- /dev/null +++ b/modules/moo.bash @@ -0,0 +1,6 @@ +#!/bin/bash +# Test module + +function moo () { + echo "MOOOO!! $1" +} \ No newline at end of file diff --git a/test.bash b/test.bash new file mode 100755 index 0000000..8eb06cb --- /dev/null +++ b/test.bash @@ -0,0 +1,23 @@ +#!/bin/bash + +set -Eeuo pipefail + +# 2>/dev/null + +# Test file + +function autoload { + #echo "Called by $(caller): Couldn't find ${BASH_COMMAND}" + if [[ -f modules/${BASH_COMMAND}.bash ]] + then + source modules/${BASH_COMMAND}.bash + ${BASH_COMMAND} + else + echo "I can't find ${BASH_COMMAND}" + fi + +} + +trap autoload ERR + +moo \ No newline at end of file From d21095c09a676d7781e5b36e70d7a6c177a2de08 Mon Sep 17 00:00:00 2001 From: kake26 Date: Mon, 13 Jun 2022 16:39:57 +0200 Subject: [PATCH 4/5] Update 'README.md' Add directions to checkout branch --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7961b19..ca07254 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Bash-Stash -A collection of console based bash scripts I've written at various times. It may include scripts written in other languages. +A collection of console based bash scripts I've written at various times. It may include scripts written in other languages. To check out this repo you must select a branch you can do this via the following command . + +git clone --b branch URL # Console From f04cc8b80b2aec275071cb0e744ffdc7d233caa8 Mon Sep 17 00:00:00 2001 From: kake26 Date: Mon, 13 Jun 2022 16:40:40 +0200 Subject: [PATCH 5/5] Update 'README.md' Fixed git command typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ca07254..3c828a7 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A collection of console based bash scripts I've written at various times. It may include scripts written in other languages. To check out this repo you must select a branch you can do this via the following command . -git clone --b branch URL +git clone -b branch URL # Console