apatel762 / home-infra

A repository containing all of the setup for my home infra (e.g. my laptop & soon, my server)
GNU Affero General Public License v3.0
0 stars 0 forks source link

Create shell script utils that can be sourced #90

Open apatel762 opened 2 years ago

apatel762 commented 2 years ago

Put them in the local bin

put a guard at the top of each one just to say that it should not be sourced

https://unix.stackexchange.com/questions/424492/how-to-define-a-shell-script-to-be-sourced-not-run

also make these helpers non executable

put a “usage: “ prompt if the script is not sourced

Create a generic snippet that can be put at the top of any of my scripts to easily source these and report a helpful error if the util scripts are not found

apatel762 commented 1 year ago

could put the scripts in the dotfiles part of the repo instead of ansible; this way it's easier to change them on the fly (assuming they don't need to be templated)