summaryrefslogtreecommitdiff
path: root/libre/ruby/ruby.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-03-04 22:00:24 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-03-04 22:00:24 -0200
commit763a62f83b4847b52b2f72598f54b2ef8ae07f87 (patch)
treea2a24ebc585e9f4a017104383bd456ec534dfed2 /libre/ruby/ruby.install
parent3ea3b610d049f879eebaa6dc9338190362d375e2 (diff)
ruby: add new package to [libre] to solve freedom issue #674 -> https://labs.parabola.nu/issues/674
Diffstat (limited to 'libre/ruby/ruby.install')
-rw-r--r--libre/ruby/ruby.install22
1 files changed, 22 insertions, 0 deletions
diff --git a/libre/ruby/ruby.install b/libre/ruby/ruby.install
new file mode 100644
index 000000000..ce78e96ec
--- /dev/null
+++ b/libre/ruby/ruby.install
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+print_gem_default_target() {
+ echo 'The default location of gem installs is $HOME/.gem/ruby'
+ echo 'Add the following line to your PATH if you plan to install using gem'
+ echo '$(ruby -rubygems -e "puts Gem.user_dir")/bin'
+ echo 'If you want to install to the system wide location, you must either:'
+ echo 'edit /etc/gemrc or run gem with the --no-user-install flag.'
+}
+
+# arg 1: the new package version
+post_install() {
+ print_gem_default_target
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ if [ "$(vercmp $2 1.9.3_p125-4)" -lt 0 ]; then
+ print_gem_default_target
+ fi
+}