__rvm: use shortcut version

Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
Nico Schottelius 2012-11-02 17:18:57 +01:00
parent d97f6794d0
commit c779e16fe2
2 changed files with 13 additions and 11 deletions

View file

@ -1,6 +1,7 @@
#!/bin/sh
#
# 2012 Evax Software <contact@evax.fr>
# 2012 Nico Schottelius (nico-cdist at schottelius.org)
#
# This file is part of cdist.
#
@ -21,20 +22,20 @@
user="$__object_id"
state_is="$(cat "$__object/explorer/state")"
state_should="$(cat "$__object/parameter/state")"
if [ "$state_is" != "$state_should" ]; then
case "$state_should" in
present)
cat << DONE
[ "$state_is" = "$state_should" ] && exit 0
case "$state_should" in
present)
cat << DONE
su - $user -c "unset rvm_path; unset rvm_bin_path; unset rvm_prefix; unset rvm_version; curl -L get.rvm.io | bash -s stable"
DONE
;;
absent)
cat << DONE
;;
absent)
cat << DONE
su - $user -c "rm -Rf \"\\\$HOME/.rvm\";
sed '/rvm\/scripts\/rvm/d' \"\\\$HOME/.bashrc\" > \"\\\$HOME/.bashrc.cdist-tmp\"
mv \"\\\$HOME/.bashrc.cdist-tmp\" \"\\\$HOME/.bashrc\""
DONE
;;
esac
fi
;;
esac

View file

@ -9,6 +9,7 @@ Changelog
* Core: Export PYTHONPATH, it's also needed by emulator
* Bugfix Type __rvm_ruby: Add clean package dependencies
* Bugfix Type __rvm_gem: Run rvm as user, not as root
* Cleanup Type __rvm: Use shortcut version
2.1.0pre5: 2012-11-01
* Core: First round of tests updated to work with multiple configuration directories