fix missing dependencies
authorIan Kelling <ian@iankelling.org>
Wed, 18 Jan 2017 22:25:04 +0000 (14:25 -0800)
committerIan Kelling <ian@iankelling.org>
Thu, 19 Jan 2017 21:19:02 +0000 (13:19 -0800)
build.rb
gitweb-descriptions
setup.sh

index 65264b68f5f99da34724f0beb01de08bedb267aa..b1a3411b75c98b8bb86a939508373582c7b63327 100755 (executable)
--- a/build.rb
+++ b/build.rb
@@ -94,7 +94,13 @@ stdpage('favorite-things', File.read('../favorite-things.html'))
 # we could use ruby native stuff here, but this was
 # better documented so meh.
 # Force because it's cache is not perfect, it definitely misses renamed symlinks.
+
+ret = 0
 ["main", "gitweb-site"].each do |basename|
   cmd = "scss --force --cache-location ../.sass-cache"
-  system("#{cmd} ../css/#{basename}.scss css/#{basename}.css")
+  unless system("#{cmd} ../css/#{basename}.scss css/#{basename}.css")
+    ret = 1
+  end
 end
+
+exit ret
index 34c797fc8ff220be137cebe7511e756c33dc59d4..cd6014b0e119bbb223506c997038d376af356393 100755 (executable)
@@ -1,4 +1,18 @@
 #!/bin/bash -l
+# Copyright (C) 2016 Ian Kelling
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # my projects all have README or --help with a short single line
 # description which I parse and put into the gitweb description.
@@ -59,7 +73,7 @@ gitweb-descriptions() {
                     _git_desc_readme
                 fi
             else
-                $f --help | sed -n '2p' > .git/description
+                ./$f --help | sed -n '2p' > .git/description
             fi
         else
             _git_desc_readme
index cfcee75694c4bf7e014d12471292b3775e6815de..59f3009bd8a45c327c05d8c5909d0e85e0a1805f 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
@@ -35,13 +35,22 @@ acme-tiny-wrapper $domain
 
 pkgs=(
     # build.rb dependencies
-    ruby-pygments.rb ruby-safe-yaml ruby-redcarpet
+    ruby-pygments.rb ruby-safe-yaml ruby-sass
     # python pkgs used for o(n^2) voting blog entry
     python-bcrypt python-passlib
     # gitweb pkgs
     gitweb highlight
 )
+if isdebian-stable; then
+    pkgs+=(build-essential ruby-dev)
+else
+    pkgs+=(ruby-redcarpet)
+fi
+
 pi ${pkgs[@]}
+if isdebian-stable; then
+    sudo gem install redcarpet
+fi
 chmod og+x _site/on2vote/vote.py