Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-07-23 17:36:24 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-07-23 17:36:27 (GMT)
commit028da6dd8bc6a0375498b51278f874a9cb7691c0 (patch)
tree5cfcb16894c3cf002802edd45c79ec9a434793c4 /modules
parent499b0e95576d08277b93fb19e65fabc44d088a61 (diff)
Don't output an error on missing buildnr file
Diffstat (limited to 'modules')
-rw-r--r--modules/buildnr_from_file/cleanup.50.write_buildnr.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/buildnr_from_file/cleanup.50.write_buildnr.sh b/modules/buildnr_from_file/cleanup.50.write_buildnr.sh
index 3153156..41309fc 100644
--- a/modules/buildnr_from_file/cleanup.50.write_buildnr.sh
+++ b/modules/buildnr_from_file/cleanup.50.write_buildnr.sh
@@ -5,7 +5,8 @@
path=$(read_config buildnr_from_file path)
if [ -n "$path" ]; then
- nr=$(<$path)
+ nr=0
+ [ -f "$path" ] && nr=$(<$path)
(( nr++ ))
- echo -n $nr > $path
+ echo -n $nr >"$path"
fi