diff --git a/scripts/.local/share/scripts/project-init b/scripts/.local/share/scripts/project-init index 3f523b1..b218027 100755 --- a/scripts/.local/share/scripts/project-init +++ b/scripts/.local/share/scripts/project-init @@ -34,6 +34,12 @@ direnv_integration() { direnv allow } +create_dir() { + if [ ! -d "$1" ]; then + mkdir "$1" + fi +} + if [ $# != 1 ]; then usage fi @@ -41,24 +47,27 @@ fi type=$1 if [ "$type" = "git" ]; then - mkdir src data copy_nix_files "flake" + create_dir data + create_dir src git_initialization direnv_integration "flake" elif [ "$type" = "remote-git" ]; then touch README.org cp ~/Documents/IT/gpl-3.0.md LICENSE.md copy_nix_files "flake" - mkdir src tests data + create_dir data + create_dir src git_initialization direnv_integration "flake" elif [ "$type" = "doc" ]; then - mkdir docs docs/assets - touch docs/Summary.org + create_dir assets + touch Report.org touch .project elif [ "$type" = "src" ]; then copy_nix_files "nix" - mkdir src data + create_dir data + create_dir src touch .project direnv_integration "nix" elif [ "$type" = "nix-ld" ]; then