projects
/
makesimple.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a8774d2
)
check bin dir and fixed test option
author
Matteo Nastasi
<nastasi@alternativeoutput.it>
Sun, 7 Aug 2011 09:14:00 +0000
(11:14 +0200)
committer
Matteo Nastasi
<nastasi@alternativeoutput.it>
Sun, 7 Aug 2011 09:14:00 +0000
(11:14 +0200)
makesimple.sh
patch
|
blob
|
history
diff --git
a/makesimple.sh
b/makesimple.sh
index
5d542b2
..
282739c
100755
(executable)
--- a/
makesimple.sh
+++ b/
makesimple.sh
@@
-29,6
+29,7
@@
if [ "$id" != "root" -a "$prjname" = "install" ]; then
exit 1
fi
TMPLPATH=/var/lib/makesimple
exit 1
fi
TMPLPATH=/var/lib/makesimple
+BINPATH=/usr/local/bin
SRCFILE=$TMPLPATH/file_src.c
HFILE=$TMPLPATH/file_inc.h
MAKFILE=$TMPLPATH/makefile
SRCFILE=$TMPLPATH/file_src.c
HFILE=$TMPLPATH/file_inc.h
MAKFILE=$TMPLPATH/makefile
@@
-41,12
+42,15
@@
if [ "$prjname" = "install" ]; then
echo "Continue (y/n)"
read a
if [ "$a" = "y" -o "$a" = "Y" ]; then
echo "Continue (y/n)"
read a
if [ "$a" = "y" -o "$a" = "Y" ]; then
- if [ ! -
x
"$TMPLPATH" ]; then
+ if [ ! -
d
"$TMPLPATH" ]; then
mkdir "$TMPLPATH" || exit 5
fi
mkdir "$TMPLPATH" || exit 5
fi
- rm -f "$TMPLPATH"/* || exit 6
- cp * "$TMPLPATH" || exit 7
- cp ./makesimple.sh /usr/local/bin || exit 8
+ if [ ! -d "$BINPATH" ]; then
+ mkdir "$BINPATH" || exit 6
+ fi
+ rm -f "$TMPLPATH"/* || exit 7
+ cp * "$TMPLPATH" || exit 8
+ cp ./makesimple.sh "$BINPATH" || exit 9
echo "Installation OK"
fi
exit 0
echo "Installation OK"
fi
exit 0