Skip to content

Commit

Permalink
Oneliners now will automatically use sudo if /usr/local is not writeable
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Feb 15, 2011
1 parent 2cd1f4c commit 300a8bc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
6 changes: 0 additions & 6 deletions README.md
Expand Up @@ -21,12 +21,6 @@ If you want to install latest release instead of HEAD, use this one:

curl https://github.com/agner/agner/raw/master/scripts/oneliner.release | sh

### Configuration

If your `/usr/local` isn't writeable to your user, either set your
`AGNER_PREFIX` variable to point to some writeable location or use
`sudo sh`.

Motivation
----------

Expand Down
7 changes: 6 additions & 1 deletion scripts/oneliner
@@ -1 +1,6 @@
DIR=`mktemp -u /tmp/agner.XXXXXX` && git clone https://github.com/agner/agner.git $DIR && cd $DIR && make && ./agner install agner && echo Fetching index... && agner list -d | awk '{printf "."; fflush()}' && echo && rm -rf $DIR
DIR=`mktemp -u /tmp/agner.XXXXXX` &&
git clone https://github.com/agner/agner.git $DIR &&
cd $DIR && make &&
if [ -w /usr/local ]; then ./agner install agner; else sudo ./agner install agner; fi &&
echo Fetching index... &&
agner list -d | awk '{printf "."; fflush()}' && echo && rm -rf $DIR
9 changes: 8 additions & 1 deletion scripts/oneliner.release
@@ -1 +1,8 @@
DIR=`mktemp -u /tmp/agner.XXXXXX` && git clone https://github.com/agner/agner.git $DIR && cd $DIR && git checkout -b release origin/release && make && ./agner install agner -v @release && echo Fetching index... && agner list -d | awk '{printf "."; fflush()}' && echo && rm -rf $DIR
DIR=`mktemp -u /tmp/agner.XXXXXX` &&
git clone https://github.com/agner/agner.git $DIR &&
cd $DIR &&
git checkout -b release origin/release &&
make &&
if [ -w /usr/local ]; then ./agner install agner -v @release; else sudo ./agner install agner -v @release; fi &&
echo Fetching index... &&
agner list -d | awk '{printf "."; fflush()}' && echo && rm -rf $DIR

0 comments on commit 300a8bc

Please sign in to comment.