Issue 676: allow for correct calling of bsd sed

This commit is contained in:
Philip Champon 2010-12-08 01:03:55 -05:00
parent b94e6ae4a0
commit ccbf51fdbe

View file

@ -65,7 +65,15 @@ function redis_config
fi fi
cp $redis_conf config/redis.conf cp $redis_conf config/redis.conf
sed -i '/^[^#]*daemonize/s/yes/no/' config/redis.conf case $OS in
## bsd sed doesn't seem to handle empty in-place edits correctly
*[Bb][Ss][Dd]*|Darwin)
sed -i '' '/^[^#]*daemonize/s/yes/no/' config/redis.conf
;;
*)
sed -i '/^[^#]*daemonize/s/yes/no/' config/redis.conf
;;
esac
} }
# Scan for -p, find out what port thin is about to use. # Scan for -p, find out what port thin is about to use.