Skip to content

Commit 6e480c4

Browse files
committed
Add install_deps_linux
1 parent 92b172e commit 6e480c4

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

commands.bash

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ function make_mobi () {
4545
ls -lh "$PWD/$SLUG.mobi"
4646
}
4747

48+
4849
function install_deps_osx () {
4950
# http://brew.sh
5051
brew update
@@ -72,6 +73,23 @@ function install_deps_osx () {
7273
}
7374

7475

76+
function install_deps_linux() {
77+
sudo apt-get update
78+
sudo apt-get install -y dbtoepub docbook docbook-xsl epubcheck fop git python-pip python-virtualenv ruby2.0 ruby2.0-dev
79+
# TODO Perhaps use rvm / rbenv to point to Ruby 2.0 by default
80+
81+
sudo pip install -U python-magic
82+
sudo pip install -U https://github.com/s3tools/s3cmd/archive/master.zip
83+
84+
sudo gem2.0 install --no-rdoc --no-ri asciidoctor kindlegen pygments.rb
85+
echo "Update PATH to point to kindlegen - see `gem2.0 contents kindlegen | fgrep bin`"
86+
87+
mkdir -p $HOME/code/asciidoctor/
88+
cd $HOME/code/asciidoctor/
89+
git clone https://github.com/asciidoctor/asciidoctor-fopub
90+
}
91+
92+
7593
function s3_put () {
7694
filename=$1
7795
shift
@@ -103,7 +121,7 @@ function make_upload () {
103121

104122
say "Syncing to blog server"
105123
cp -v "$SLUG.html" ../blog/notes/python/index.html
106-
rm -v ../blog/notes/python/*.png
124+
rm -vf ../blog/notes/python/*.png
107125
cp -v *.png ../blog/notes/python/
108126
cd ../blog
109127
blog_sync # Defined in ~/.bash_profile

0 commit comments

Comments
 (0)