Backed up pre-existing configs to local branch
This commit is contained in:
parent
8cd9134e10
commit
873bfc08be
39 changed files with 15 additions and 781 deletions
|
@ -1,30 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
function autosource {
|
||||
local bash_function_dirs bash_function_dir
|
||||
|
||||
# Test if 1 argument was given
|
||||
if (( $# == 0 )); then
|
||||
echo "autosource: basename of a file in BASH_FUNC_PATH required"
|
||||
echo "autosource: usage: autosource basename [arguments]"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Split the BASH_FUNC_PATH into an array of directory names
|
||||
IFS=: read -ra bash_function_dirs <<< "${BASH_FUNC_PATH}"
|
||||
|
||||
# Look for a .sh file with the basename given as first argument in each direc-
|
||||
# tory in each directory in turn
|
||||
for bash_function_dir in "${bash_function_dirs[@]}"; do
|
||||
if [[ -r "${bash_function_dir}/${1}.sh" ]]; then
|
||||
|
||||
# If we find a matching file, source it and skip the rest of this function
|
||||
. "${bash_function_dir}/${1}.sh" ${@:2}
|
||||
return
|
||||
fi
|
||||
done
|
||||
|
||||
# If the loop completes no matching file is in BASH_FUNC_PATH
|
||||
echo "autosource: no ${1} in (${BASH_FUNC_PATH})"
|
||||
return 1
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
function dot_msg {
|
||||
echo "$@"
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
[status]
|
||||
showUntrackedFiles = no
|
Loading…
Add table
Add a link
Reference in a new issue