Summary Files Commits Branches @commit @diff @stats
path: root / scripts / new
diff options
context:
space:
mode:
Commitf522fb4f17114d48e2de5b60a9b34dea350e77cb (patch)
Author
 Syndamia <kamen@syndamia.com>
2026-10-31 11:01:59 +0200
Committer
 Syndamia <kamen@syndamia.com>
2026-10-31 11:10:51 +0200
Files949be2ee14d89675cd8723c6da3a91e30f32d9a9 /scripts/new
cli-f522fb4f17114d48e2de5b60a9b34dea350e77cb.tar
cli-f522fb4f17114d48e2de5b60a9b34dea350e77cb.tar.gz
cli-f522fb4f17114d48e2de5b60a9b34dea350e77cb.zip
feat!: Initial setup
1 files changed, 20 insertions, 0 deletions
-rwxr-xr-xscripts/new20
diff --git a/scripts/new b/scripts/new
new file mode 100755
index 0000000..65e677a
--- /dev/null
+++ b/scripts/new
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+while [ -z "$1" ]
+do
+ printf 'Repository: '
+ read
+ set "$REPLY"
+done
+
+set "${1##/}"
+
+root_dir="${1%%/*}"
+repo_dir="${1#*/}"
+
+cd "$root_dir"
+if git init --bare "$repo_dir"
+then
+ echo -e "\nClone repo with:\n\tgit clone git@syndamia.com:$1"
+ echo -e "\nUpload local repo with:\n\tgit push git@syndamia.com:$1 '*:*'"
+fi