projects
/
brisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1c62cba
)
add ftokk_path var to allow temporary move of the ftok directory
author
Matteo Nastasi (mop)
<nastasi@alternativeoutput.it>
Sat, 19 Apr 2008 15:04:19 +0000
(15:04 +0000)
committer
Matteo Nastasi (mop)
<nastasi@alternativeoutput.it>
Sat, 19 Apr 2008 15:04:19 +0000
(15:04 +0000)
INSTALL.sh
patch
|
blob
|
history
diff --git
a/INSTALL.sh
b/INSTALL.sh
index
713d360
..
c0ac587
100755
(executable)
--- a/
INSTALL.sh
+++ b/
INSTALL.sh
@@
-130,7
+130,6
@@
fi
#
# Pre-check
#
#
# Pre-check
#
-
# check for etc path existence
dsta="`dirname "$web_path"`"
etc_path="`searchetc "$dsta" Etc`"
# check for etc path existence
dsta="`dirname "$web_path"`"
etc_path="`searchetc "$dsta" Etc`"
@@
-142,28
+141,37
@@
fi
#
# Installation
#
#
# Installation
#
+ftokk_path="${ftok_path}k"
+
if [ $n_players -ne 3 -a $n_players -ne 5 ]; then
echo "n_players ($n_players) out of range (3|5)"
exit 1
fi
if [ "$web_only" = "FALSE" ]; then
if [ $n_players -ne 3 -a $n_players -ne 5 ]; then
echo "n_players ($n_players) out of range (3|5)"
exit 1
fi
if [ "$web_only" = "FALSE" ]; then
- if [ ! -d
$ftok_path
]; then
+ if [ ! -d
"$ftok_path" -a ! -d "$ftokk_path"
]; then
echo "ftok_path (\"$ftok_path\") not exists"
exit 2
fi
echo "ftok_path (\"$ftok_path\") not exists"
exit 2
fi
- touch $ftok_path/spy.txt >/dev/null 2>&1
+ if [ -d "$ftok_path" -a -d "$ftokk_path" ]; then
+ echo "ftok_path (\"$ftok_path\") and ftokk_path (\"$ftokk_path\") exist, cannot continue"
+ exit 4
+ fi
+ if [ -d "$ftok_path" ]; then
+ mv "$ftok_path" "$ftokk_path"
+ fi
+ touch $ftokk_path/spy.txt >/dev/null 2>&1
if [ $? -ne 0 ]; then
if [ $? -ne 0 ]; then
- echo "ftok
_path (\"$ftok_path\") write not allow
."
+ echo "ftok
k_path (\"$ftokk_path\") write not allowed
."
exit 3
fi
exit 3
fi
- rm $ftok_path/spy.txt
+ rm $ftok
k
_path/spy.txt
# create the fs subtree to enable ftok-ing
# create the fs subtree to enable ftok-ing
- touch ${ftok_path}/main
- chmod 666 ${ftok_path}/main
+ touch ${ftok
k
_path}/main
+ chmod 666 ${ftok
k
_path}/main
for i in `seq 0 99`; do
for i in `seq 0 99`; do
- touch ${ftok_path}/table$i
- chmod 666 ${ftok_path}/table$i
+ touch ${ftok
k
_path}/table$i
+ chmod 666 ${ftok
k
_path}/table$i
done
fi
install -d ${web_path}__
done
fi
install -d ${web_path}__
@@
-234,5
+242,7
@@
mv ${web_path}__ ${web_path}
if [ -d ${web_path}.old ]; then
rm -rf ${web_path}.old
fi
if [ -d ${web_path}.old ]; then
rm -rf ${web_path}.old
fi
-
+if [ "$web_only" = "FALSE" ]; then
+ mv "$ftokk_path" "$ftok_path"
+fi
exit 0
exit 0