Make installing over existing chromebrew easy

  - Change to not use wget's "-c" option for non tempral files
  - Change to remove /usr/local/bin/cc, /usr/local/bin/crew and
    /usr/local/lib/crew/.git prior to make them
  - Change to reuse /usr/local/lib/crew/lib if it exists
parent 4dfeb1b5
...@@ -144,15 +144,19 @@ done ...@@ -144,15 +144,19 @@ done
#download, prepare and install chromebrew #download, prepare and install chromebrew
cd $CREW_LIB_PATH cd $CREW_LIB_PATH
wget -N -c $URL/crew rm -rf crew lib packages
wget -N $URL/crew
chmod +x crew chmod +x crew
rm -f $CREW_PREFIX/bin/crew
sudo ln -s `pwd`/crew $CREW_PREFIX/bin sudo ln -s `pwd`/crew $CREW_PREFIX/bin
#install crew library #install crew library
mkdir $CREW_LIB_PATH/lib && cd $CREW_LIB_PATH/lib mkdir -p $CREW_LIB_PATH/lib
wget -N -c $URL/lib/package.rb cd $CREW_LIB_PATH/lib
wget -N -c $URL/lib/package_helpers.rb wget -N $URL/lib/package.rb
wget -N $URL/lib/package_helpers.rb
#Making GCC act like CC (For some npm packages out there) #Making GCC act like CC (For some npm packages out there)
rm -f /usr/local/bin/cc
sudo ln -s /usr/local/bin/gcc /usr/local/bin/cc sudo ln -s /usr/local/bin/gcc /usr/local/bin/cc
#This will allow a lot of things to work without sudo #This will allow a lot of things to work without sudo
...@@ -160,6 +164,7 @@ sudo chown -R `id -u`:`id -g` /usr/local ...@@ -160,6 +164,7 @@ sudo chown -R `id -u`:`id -g` /usr/local
#prepare sparse checkout .rb packages directory and do it #prepare sparse checkout .rb packages directory and do it
cd $CREW_LIB_PATH cd $CREW_LIB_PATH
rm -rf .git
git init git init
git remote add -f origin https://github.com/$OWNER/$REPO.git git remote add -f origin https://github.com/$OWNER/$REPO.git
git config core.sparsecheckout true git config core.sparsecheckout true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment