initial commit... starting with a structure on which i hope to expand.
Dev Ghai

Dev Ghai commited on 2014-01-22 21:53:02
Showing 2 changed files, with 64 additions and 0 deletions.

... ...
@@ -0,0 +1,27 @@
1
+#!/bin/sh
2
+
3
+SetTerminatorAsDefaultTerm () {
4
+	# Credit: http://forums.linuxmint.com/viewtopic.php?f=208&t=150071
5
+	gsettings set org.gnome.desktop.default-applications.terminal exec /usr/bin/terminator;
6
+	gsettings set org.gnome.desktop.default-applications.terminal exec-arg "-x --new-tab";
7
+	gsettings set org.cinnamon.desktop.default-applications.terminal exec /usr/bin/terminator;
8
+	gsettings set org.cinnamon.desktop.default-applications.terminal exec-arg "-x --new-tab";
9
+	debug "Done setting up Terminator as default terminal."
10
+}
11
+
12
+debug() {
13
+	# TODO: Use debug flag using getopts
14
+	echo "DEBUG: $1";
15
+}
16
+
17
+# TODO: This script is made to run only on GNOME Ubuntu. Ask check to gracefullt exit if not on that system.
18
+# If Terminator is installed, make it the default terminal emulator of the system.
19
+if [ -f /usr/bin/terminator ]; then
20
+	SetTerminatorAsDefaultTerm;
21
+else
22
+	echo "Terminator was not found on the system. Installing..."
23
+	# install terminator and reconfig
24
+	sudo apt-get install terminator;
25
+	SetTerminatorAsDefaultTerm;
26
+fi
27
+
... ...
@@ -0,0 +1,37 @@
1
+# http://blog.mornati.net/2011/09/15/create-git-repository-on-shared-host/
2
+newgit()
3
+{
4
+   if [ -z $1 ]; then
5
+       # echo "usage: $FUNCNAME project-name ['description with spaces']"
6
+       echo "usage: $FUNCNAME project-name"
7
+   else
8
+       repoRoot="repos"
9
+       website="devghai.com"
10
+       user="devghaic"
11
+       gitdir="$HOME/$repoRoot/$1"
12
+       mkdir $gitdir
13
+       pushd `pwd`
14
+       cd $gitdir
15
+       git --bare init
16
+       git --bare update-server-info
17
+       cp hooks/post-update.sample hooks/post-update
18
+       chmod a+x hooks/post-update
19
+       # if [ -z $2 ]; then
20
+       #      echo $2 > description
21
+       # fi
22
+       echo "----------------------------------------------------------------------------------------------------"
23
+       echo "| Credit: Marco Mornati @ http://blog.mornati.net/2011/09/15/create-git-repository-on-shared-host/ |"
24
+       echo "----------------------------------------------------------------------------------------------------"
25
+       echo "Clone repository using: "
26
+       echo "$ git clone ssh://$user@$website$gitdir"
27
+       echo ""
28
+       echo "While committing for the first time..."
29
+       echo "$ git add ."
30
+       echo "$ git commit . -m 'initial commit'"
31
+       echo "$ git push origin master"
32
+       echo ""
33
+       echo "Please edit $gitdir/description to add some intro about the repo."
34
+       echo "===================================================================================================="
35
+       popd
36
+   fi
37
+}
0 38