Browse Source

layout changes

Eeems 10 years ago
parent
commit
d5cb0120ee
10 changed files with 56 additions and 0 deletions
  1. 0 0
      .gitignore
  2. 14 0
      bin/add-project
  3. 10 0
      bin/add-site
  4. 7 0
      bin/install-shell
  5. 1 0
      configure.sh
  6. 3 0
      etc/Makefile.conf
  7. 0 0
      etc/Makefile.in
  8. 13 0
      etc/sites.conf
  9. 4 0
      etc/sites.d/.gitignore
  10. 4 0
      src/.gitignore

+ 0 - 0
.gitignore


+ 14 - 0
bin/add-project

@@ -0,0 +1,14 @@
+#!/bin/bash
+if [[ "$1" != "" ]];then
+	if [[ "$2" != "" ]];then
+		mkdir -p src/$1;
+		ln -s `readlink -f $2`  src/$1/src;
+		echo "Linked source in $2";
+	else
+		mkdir -p src/$1/src;
+	fi;
+	touch src/$1/build.sh
+	echo "Created project $1";
+else
+	echo "Usage: $0 <projectname> [<sourcedir>]";
+fi;

+ 10 - 0
bin/add-site

@@ -0,0 +1,10 @@
+#!/bin/bash
+if [[ "$1" != "" ]] && [[ "$2" != "" ]]; then
+	read -s -p "Password:" pass;
+	file=`dirname $BASH_SOURCE`/../etc/sites.d/$2;
+	touch $file;
+	echo "sites+=([username]=\"$1\" [host]=\"$2\" [password]=\"$pass\")" > $file;
+	echo "Site $2 created";
+else
+	echo "Usage: $0 <username> <hostname>"
+fi;

+ 7 - 0
bin/install-shell

@@ -0,0 +1,7 @@
+#!/bin/bash
+PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:`readlink -f $(dirname $BASH_SOURCE)`;
+if [[ "$1" != "" ]];then
+	$1;
+else
+	sh;
+fi;

+ 1 - 0
configure.sh

@@ -0,0 +1 @@
+#!/bin/bash

+ 3 - 0
etc/Makefile.conf

@@ -0,0 +1,3 @@
+############################################################
+#                       Basic Config                       #
+############################################################

+ 0 - 0
Makefile → etc/Makefile.in


+ 13 - 0
etc/sites.conf

@@ -0,0 +1,13 @@
+###########################################################################
+#                                                                         #
+#                           Site declaration                              #
+#                                                                         #
+###########################################################################
+sites=()
+for f in `dirname $BASH_SOURCE`/sites.d/*; do source $f; done
+###########################################################################
+#                                                                         #
+#                   To Add a new site:                                    #
+# sites+=([username]="username" [password]="password" [host]="hostname")  #
+#                                                                         #
+###########################################################################

+ 4 - 0
etc/sites.d/.gitignore

@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore

+ 4 - 0
src/.gitignore

@@ -0,0 +1,4 @@
+# Ignore everything in this directory
+*
+# Except this file
+!.gitignore