Skip to content

MarmadileManteater/combine-bash-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

i love bash

frankly too much, and as a woman who obsesses over her hammer, every problem looks like a nail.

this is one of those nails

one thing i've always struggled with is that there is not a really good way to relatively import a bash script into another. sure, you could do something like ${BASH_SOURCE[0]}, and its not perfect, but there are, in fact, ways to make it better.

but, i don't like that solution.

you can just write your script in multiple files with the idea that the script must be ran from some specific starting directory, and that's consistent, but i also don't exactly like it. its good for development, but outside of that, its not satisfactory for me.

i wanna overengineer scripts with many files which seperate functionality into a neatly organized folder structure, and i want that to output something that can just be called as 1 single file which can be called from anywhere.

the thing is, bash function names are really WIGGLY. they can contain forward slashes and periods, and well, a lot more than that, but that is enough to make functions which are identical in structure to a path.

this exists so that i can write my bash scripts with some assumed root directory while i'm working on them, and export them as 1 single output file which behaves the same no matter where you call it from.

reqs

  • sed
  • grep
  • cat
  • ls

About

a bash script to combine multi-file bash projects into one output script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages