Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #73 from c9/sed-e
Browse files Browse the repository at this point in the history
do not use sed -E since it doesn't work on old versions
  • Loading branch information
nightwing authored Aug 28, 2016
2 parents 159a7d4 + 3ba5084 commit 7413f5a
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,10 @@ start() {
# finalize
pushd "$C9_DIR"/node_modules/.bin
for FILE in "$C9_DIR"/node_modules/.bin/*; do
if [ "$os" == darwin ]; then
sed -i "" -E s:'#!/usr/bin/env node':"#!$NODE":g "$(readlink "$FILE")"
else
sed -i -E s:'#!/usr/bin/env node':"#!$NODE":g "$(readlink "$FILE")"
fi
FILE=$(readlink "$FILE")
# can't use the -i flag since it is not compatible between bsd and gnu versions
sed -e's/#!\/usr\/bin\/env node/#!'"${NODE//\//\\/}/" "$FILE" > "$FILE.tmp-sed"
mv "$FILE.tmp-sed" "$FILE"
done
popd

Expand Down Expand Up @@ -318,7 +317,7 @@ check_tmux_version(){
if [ ! -x "$1" ]; then
return 1
fi
tmux_version=$($1 -V | sed -e's/^[a-z0-9.-]* //g')
tmux_version=$($1 -V | sed -e's/^[a-z0-9.-]* //g' | sed -e's/[a-z]*$//')
if [ ! "$tmux_version" ]; then
return 1
fi
Expand Down

0 comments on commit 7413f5a

Please sign in to comment.