1
0
mirror of https://github.com/RyanGreenup/cadmus.git synced 2025-08-12 09:04:39 +02:00

Add Global Path Variable

This commit is contained in:
Ryan Greenup
2020-07-15 01:14:19 +10:00
parent e648fe05a3
commit 3e14c8f6f0
3 changed files with 6 additions and 4 deletions

View File

@@ -22,10 +22,10 @@ main() {
# *** Skim and Grep, the important stuff
SkimAndGrep () {
## Change directory if One was specified
## Change directory if One was specified, exit if no directory exists
if [ "${1:-}" != "" ]; then
cd "${1}"
cd "${1}" || exit 4
fi
@@ -89,7 +89,7 @@ arguments () {
while test $# -gt 0
do
case "$1" in
-d) SkimAndGrep $2 && exit 0
-d) SkimAndGrep "${2}" && exit 0
;;
--d) SkimAndGrep $2 && exit 0
;;