summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdesc2
-rwxr-xr-xhelp1
-rwxr-xr-xsetup-remote29
3 files changed, 31 insertions, 1 deletions
diff --git a/desc b/desc
index e75bcbb..b99a719 100755
--- a/desc
+++ b/desc
@@ -19,7 +19,7 @@ case $repo in
esac
if [ ! -d "$repo" ]; then
- echo "$repo doesn't exist"
+ echo "$repo does not exist"
exit 1
fi
diff --git a/help b/help
index c60e0ae..2171cee 100755
--- a/help
+++ b/help
@@ -12,4 +12,5 @@ unignore <name>
bash
clone-all-github
setup-receive-hooks
+setup-remote <name> <remote_name> <remote>
"""
diff --git a/setup-remote b/setup-remote
new file mode 100755
index 0000000..f911633
--- /dev/null
+++ b/setup-remote
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+if [ $# -ne 3 ]; then
+ echo "usage: setup-remote <name> <remote_name> <remote>"
+ exit 1
+fi
+
+set -xe
+
+USER="compromyse"
+
+base_dir="$HOME"
+repo="${base_dir}/$1"
+
+case $repo in
+ *\.git)
+ ;;
+ *)
+ repo="${new_repo}.git"
+ ;;
+esac
+
+if [ ! -d "$repo" ]; then
+ echo "$repo does not exist"
+ exit 1
+fi
+
+cd $repo
+git remote add $2 $3