--- /dev/null
+$ su
+# ./makesimple.sh install
+
--- /dev/null
+/*
+ * #PRJNAME#.h
+ *
+ * Copyright (C) #COPYDATE# #COPYAUTH#
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details. You should have received a
+ * copy of the GNU General Public License along with this program; if
+ * not, write to the Free Software Foundation, Inc, 59 Temple Place -
+ * Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+
+#include <stdlib.h>
+#include <stdio.h>
+
--- /dev/null
+/*
+ * #PRJNAME#.c
+ *
+ * Copyright (C) #COPYDATE# #COPYAUTH#
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABLILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details. You should have received a
+ * copy of the GNU General Public License along with this program; if
+ * not, write to the Free Software Foundation, Inc, 59 Temple Place -
+ * Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "#PRJNAME#.h"
+
+int main(int argc, char *argv[])
+{
+
+
+ exit (0);
+ return (0);
+}
--- /dev/null
+#
+# Project #PRJNAME#
+#
+EXE=#PRJNAME#
+OBJ=#PRJNAME#.o
+
+CC?=gcc
+
+ALL: #PRJNAME#
+
+#PRJNAME#: #PRJNAME#.c #PRJNAME#.h
+ $(CC) -o #PRJNAME# #PRJNAME#.c
+
+clean:
+ rm -f $(EXE) $(OBJ) *~
+
+.PHONY: clean ALL
--- /dev/null
+#!/bin/bash
+#set -x
+function sedder() {
+ sed "s/#PRJNAME#/$prjname/g" |\
+ sed "s/#COPYDATE#/$copydate/g" |\
+ sed "s/#COPYAUTH#/$copyauth/g"
+}
+
+
+id=`whoami`
+if [ $# -lt 1 ]; then
+ echo "$0 [-e <e-mail>] <prjname>"
+ exit 1
+fi
+
+# verifica email autore
+if [ "$1" = "-e" ]; then
+ if [ $# -ne 3 ]; then
+ echo "$0 -e <e-mail> <prjname>"
+ exit 1
+ fi
+ emailauth="$2"
+ shift 2
+fi
+prjname="$1"
+
+if [ "$id" != "root" -a "$prjname" = "install" ]; then
+ echo "you must be root user to install this package"
+ exit 1
+fi
+TMPLPATH=/var/lib/makesimple
+SRCFILE=$TMPLPATH/file_src.c
+HFILE=$TMPLPATH/file_inc.h
+MAKFILE=$TMPLPATH/makefile
+
+copydate="`date +%Y`"
+copyauth="$emailauth"
+if [ "$prjname" = "install" ]; then
+ echo "Install"
+ ls *
+ echo "Continue (y/n)"
+ read a
+ if [ "$a" = "y" -o "$a" = "Y" ]; then
+ if [ ! -x "$TMPLPATH" ]; then
+ mkdir "$TMPLPATH" || exit 5
+ fi
+ rm -f "$TMPLPATH"/* || exit 6
+ cp * "$TMPLPATH" || exit 7
+ cp ./makesimple.sh /usr/local/bin || exit 8
+ echo "Installation OK"
+ fi
+ exit 0
+fi
+mkdir "$prjname" || exit 2
+cd "$prjname" || exit 3
+sedder < $SRCFILE > ./${prjname}.c
+sedder < $HFILE > ./${prjname}.h
+sedder < $MAKFILE > ./makefile
+
+exit 0