forked from ungleich-public/cdist
__rvm: use shortcut version
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
d97f6794d0
commit
c779e16fe2
2 changed files with 13 additions and 11 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# 2012 Evax Software <contact@evax.fr>
|
# 2012 Evax Software <contact@evax.fr>
|
||||||
|
# 2012 Nico Schottelius (nico-cdist at schottelius.org)
|
||||||
#
|
#
|
||||||
# This file is part of cdist.
|
# This file is part of cdist.
|
||||||
#
|
#
|
||||||
|
@ -21,20 +22,20 @@
|
||||||
user="$__object_id"
|
user="$__object_id"
|
||||||
state_is="$(cat "$__object/explorer/state")"
|
state_is="$(cat "$__object/explorer/state")"
|
||||||
state_should="$(cat "$__object/parameter/state")"
|
state_should="$(cat "$__object/parameter/state")"
|
||||||
if [ "$state_is" != "$state_should" ]; then
|
|
||||||
case "$state_should" in
|
[ "$state_is" = "$state_should" ] && exit 0
|
||||||
present)
|
|
||||||
cat << DONE
|
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"
|
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
|
DONE
|
||||||
;;
|
;;
|
||||||
absent)
|
absent)
|
||||||
cat << DONE
|
cat << DONE
|
||||||
su - $user -c "rm -Rf \"\\\$HOME/.rvm\";
|
su - $user -c "rm -Rf \"\\\$HOME/.rvm\";
|
||||||
sed '/rvm\/scripts\/rvm/d' \"\\\$HOME/.bashrc\" > \"\\\$HOME/.bashrc.cdist-tmp\"
|
sed '/rvm\/scripts\/rvm/d' \"\\\$HOME/.bashrc\" > \"\\\$HOME/.bashrc.cdist-tmp\"
|
||||||
mv \"\\\$HOME/.bashrc.cdist-tmp\" \"\\\$HOME/.bashrc\""
|
mv \"\\\$HOME/.bashrc.cdist-tmp\" \"\\\$HOME/.bashrc\""
|
||||||
|
|
||||||
DONE
|
DONE
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ Changelog
|
||||||
* Core: Export PYTHONPATH, it's also needed by emulator
|
* Core: Export PYTHONPATH, it's also needed by emulator
|
||||||
* Bugfix Type __rvm_ruby: Add clean package dependencies
|
* Bugfix Type __rvm_ruby: Add clean package dependencies
|
||||||
* Bugfix Type __rvm_gem: Run rvm as user, not as root
|
* Bugfix Type __rvm_gem: Run rvm as user, not as root
|
||||||
|
* Cleanup Type __rvm: Use shortcut version
|
||||||
|
|
||||||
2.1.0pre5: 2012-11-01
|
2.1.0pre5: 2012-11-01
|
||||||
* Core: First round of tests updated to work with multiple configuration directories
|
* Core: First round of tests updated to work with multiple configuration directories
|
||||||
|
|
Loading…
Reference in a new issue