forked from thoughtbot/laptop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install silversearcher from apt when possible
- Loading branch information
Showing
5 changed files
with
44 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
silver_searcher_from_source() { | ||
git clone git://github.com/ggreer/the_silver_searcher.git /tmp/the_silver_searcher | ||
sudo aptitude install -y automake pkg-config libpcre3-dev zlib1g-dev liblzma-dev | ||
sh /tmp/the_silver_searcher/build.sh | ||
cd /tmp/the_silver_searcher | ||
sh build.sh | ||
sudo make install | ||
cd | ||
rm -rf /tmp/the_silver_searcher | ||
} | ||
|
||
if ! command -v ag >/dev/null; then | ||
fancy_echo "Installing The Silver Searcher (better than ack or grep) to search the contents of files ..." | ||
|
||
if aptitude show silversearcher-ag &>/dev/null; then | ||
sudo aptitude install silversearcher-ag | ||
else | ||
silver_searcher_from_source | ||
fi | ||
fi |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters