projects
/
monkeysphere.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added a prerm script to explicitly fail if someone attempts to downgrade to anything...
[monkeysphere.git]
/
src
/
share
/
common
diff --git
a/src/share/common
b/src/share/common
index 83f2d6f0387ce8da484e327349ad09a498c2a9bf..83120d120c785e11cf9ab291852eea3eafe0db84 100644
(file)
--- a/
src/share/common
+++ b/
src/share/common
@@
-354,12
+354,15
@@
remove_monkeysphere_lines() {
file="$1"
file="$1"
- if [ -z "$file" ] ; then
+ # return error if file does not exist
+ if [ ! -e "$file" ] ; then
return 1
fi
return 1
fi
- if [ ! -e "$file" ] ; then
- return 1
+ # just return ok if the file is empty, since there aren't any
+ # lines to remove
+ if [ ! -s "$file" ] ; then
+ return 0
fi
tempfile=$(mktemp "${file}.XXXXXXX") || \
fi
tempfile=$(mktemp "${file}.XXXXXXX") || \