I tried installing it on my system and it failed mostly because the NvChad was by default installed to the `.config` directory. I use a custom dir for my `XDG_CONFIG_HOME` so I figured if anyone has the same issue this would be an easy way to have it not work for them, the fallback dir here is `.config` if the user has not set a custom one.
Giving either --install or --update flag is neccessary for the script to proceed
-i | --install => Install the config.
-u | --update => Update the existing config without removing existing stuff.
-b | --backup 'path' => Custom config backup path.
-nb | --no-backup => Don't take existing config backup. Use with caution.
Update formatting using following command
shfmt -i 2 -sr -p -bn -ci -w install.sh
* modify sed command to work in both gnu sed and mac os sed
https://stackoverflow.com/a/4247319
* use printf everywhere for more compatibility
* add some error checking
Gave up and decided to clone the config and reinstall over my previous install to add later. Made the following modifications:
1 - removed the extra echos (use echo -e "\n some line " in the future)
2 - packer doesn't install if there's a previously installed packer folder. So the bash script purges the previous packer folder and starts anew.
tested the config correctly