various scripts I use to make my life easier

moved some files around to better organiz, added new-repo git command

Changed files
+30 -1
git-hooks
git-shell-commands
+1 -1
git-hooks/post-receive
···
git push --mirror "$REPO_URL" >> "$LOGFILE" 2>&1
echo "[$(date)] END PUSH $REPO_PATH" >> "$LOGFILE"
-
# vim: filetype=sh
+
# vim: filetype=bash
+23
git-shell-commands/new-repo
···
+
#!/bin/bash
+
# this script allows the creation of new repos over ssh on git server
+
# public repos will get a knot.conf containing the remote
+
# private repos will just exist on the server
+
# USAGE:
+
# ssh git@<host> new-repo
+
# - follow the prompts
+
+
echo "oh look you are starting a project you won't finish again.\n"
+
read -p "whats this one called? " PROJECT_NAME
+
if [[ $PROJECT_NAME != *".git"* ]]; then
+
$PROJECT_NAME = "${PROJECT_NAME}.git"
+
fi
+
read -p "what's the remote(leave blank if private)" REMOTE_URL
+
+
git --bare init "${PROJECT_NAME}"
+
+
if [[ $REMOTE_URL ]]; then
+
touch "${PROJECT_NAME}/knot.conf"
+
echo "${REMOTE_URL}" >> "${PROJECT_NAME}/knot.conf"
+
fi
+
+
#vim: filetype=bash
+6
git-shell-commands/no-interactive-login
···
+
#!/bin/sh
+
pjintf '%s\n' "Hi $USER! You've successfully authenticated, but I do not"
+
printf '%s\n' "provide interactive shell access. Please go away now!"
+
exit 128
+
+
# vim: filetype=bash