PromyLOPh/pianobar — pull request #343 by memborsky (2013-01-10 16:51:21+00:00)
Title: Bootstrap pianobar install/update

**Note:** This set of scripts works for Mac OS X 10.7+ and Ubuntu 12.04 only currently.

This set of scripts will build and/or update a users pianobar installation.

Simply run `script/update` to update pianobar from within the pianobar root source folder, or `script/bootstrap` to install for the first time.

- During installation (Mac OS X)
![mac-install-json](https://f.cloud.github.com/assets/423711/57349/7bb8ef62-5b44-11e2-9028-50418eb8ed41.png)

- Installation complete (Mac OS X)
![mac-install-complete](https://f.cloud.github.com/assets/423711/57351/805767ba-5b44-11e2-96e7-4f308bd8e7ad.png)

- /tmp/pianobar-bootstrap (Mac OS X)
```
==> Downloading https://github.com/downloads/json-c/json-c/json-c-0.10.tar.gz
Already downloaded: /Users/matt/Library/Caches/Homebrew/json-c-0.10.tar.gz
==> ./configure --prefix=/usr/local/Cellar/json-c/0.10
==> make install
/usr/local/Cellar/json-c/0.10: 23 files, 196K, built in 19 seconds
CC src/main.c
CC src/player.c
CC src/settings.c
CC src/terminal.c
CC src/ui_act.c
CC src/ui.c
CC src/ui_readline.c
CC src/ui_dispatch.c
CC src/libpiano/crypt.c
CC src/libpiano/piano.c
CC src/libpiano/request.c
CC src/libpiano/response.c
CC src/libwaitress/waitress.c
LINK pianobar
install -d //usr/local/bin/
install -m755 pianobar //usr/local/bin/
install -d //usr/local/share/man/man1/
install -m644 contrib/pianobar.1 //usr/local/share/man/man1/
```

- During installation (Ubuntu 12.04)
![ubuntu-install-json](https://f.cloud.github.com/assets/423711/57353/88272bd8-5b44-11e2-8dcd-3508ba5b9fcf.png)

- Installation complete (Ubuntu 12.04)
![ubuntu-install-complete](https://f.cloud.github.com/assets/423711/57354/8afa76d0-5b44-11e2-9414-f9cf2abf9725.png)

- /tmp/pianobar-bootstrap (Ubuntu 12.04)
```
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
libjson0-dev
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/69.5 kB of archives.
After this operation, 614 kB of additional disk space will be used.
Selecting previously unselected package libjson0-dev.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 91406 files and directories currently installed.)
Unpacking libjson0-dev (from .../libjson0-dev_0.9-1ubuntu1_i386.deb) ...
Setting up libjson0-dev (0.9-1ubuntu1) ...
CC src/main.c
src/main.c: In function ‘BarMainGetLoginCredentials’:
src/main.c:148:10: warning: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Wunused-result]
CC src/player.c
CC src/settings.c
CC src/terminal.c
CC src/ui_act.c
CC src/ui.c
CC src/ui_readline.c
CC src/ui_dispatch.c
CC src/libpiano/crypt.c
CC src/libpiano/piano.c
CC src/libpiano/request.c
CC src/libpiano/response.c
CC src/libwaitress/waitress.c
LINK pianobar
install -d //usr/local/bin/
install -m755 pianobar //usr/local/bin/
install -d //usr/local/share/man/man1/
install -m644 contrib/pianobar.1 //usr/local/share/man/man1/
```

The original concept of this type of bootstrap script came from https://github.com/play/play/tree/v3