Compare commits

..

2 commits

Author SHA1 Message Date
Paul
67e3a383d7 First working copy of autoload 2022-06-12 13:26:38 -05:00
kake26
f8ff3fe5b9 Update 'README.md'
Updated readme
2021-09-25 23:43:46 +02:00
6 changed files with 49 additions and 12 deletions

18
.bashrc Executable file
View file

@ -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

0
LICENSE Normal file → Executable file
View file

0
NOTES Normal file → Executable file
View file

12
README.md Normal file → Executable file
View file

@ -1,15 +1,5 @@
# Bash-Stash # Bash-Stash
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 # Console
These are daily use type console scripts. These are various useful 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.

6
modules/moo.bash Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
# Test module
function moo () {
echo "MOOOO!! $1"
}

23
test.bash Executable file
View file

@ -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