]> git.madduck.net Git - etc/mrsetup.git/blobdiff - mrsetup

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

make the shell -i -l
[etc/mrsetup.git] / mrsetup
diff --git a/mrsetup b/mrsetup
index 5af48336b22f769cd0c369dc398a83ddb0b14b3c..0a0e25242a7c147c7ea73b42d794d028a35790fc 100755 (executable)
--- a/mrsetup
+++ b/mrsetup
@@ -19,24 +19,29 @@ MR_FGIT=.fgits/mr.git
 MR=.mr
 BIN_DIR=.bin
 
+if [ -z "${SSH_AUTH_SOCK:-}" ]; then
+  echo E: '$SSH_AUTH_SOCK' is not set. >&2
+  exit 1
+fi
+
 if [ ! -x "$(command -v git)" ]; then
   echo E: git is not installed. >&2
-  exit 1
+  exit 2
 fi
 
 if [ -e .mrconfig ]; then
   echo E: .mrconfig already exists. >&2
-  exit 2
+  exit 3
 fi
 
 if [ -d "$MR_FGIT" ]; then
   echo E: "$MR_FGIT" already exists. >&2
-  exit 3
+  exit 4
 fi
 
 if [ -d ".git" ]; then
   echo E: .git already exists. >&2
-  exit 3
+  exit 5
 fi
 
 if [ -d code/mr ]; then
@@ -44,7 +49,7 @@ if [ -d code/mr ]; then
     echo W: code/mr already exists, let us hope for the best... >&2
   else
     echo E: code/mr already exists. >&2
-    exit 4
+    exit 6
   fi
 else
   echo I: cloning mr into ${MR_CODE}...
@@ -98,4 +103,11 @@ else
   git push --all
 fi
 
+[ -f "$0" ] && rm $0
+
+echo I: spawning a shell...
+$SHELL --interactive --login
+
+echo I: back from the shell.
+
 exit 0