As collection of shell-functions to install and setup things in your Debian/Ubuntu box.
-
All functions are collected conveniently in one file:
/bin/debuntu_fun.sh
. -
Sourcing this file will have no side effects besides defining functions.
-
There is no dependency on any tool or platform to run a function. No ruby, python, or whatever is required.
-
Every function is "namespaced" under
debuntu_...
. -
Every function is indempotent, i.e. calling a function once, twice, or more shall have the same result.
-
Applying a function can be destructive! E.g.
torquebox_install_...
will stop the current instance, possibly remove the installed version (including all deployed applications!), and reinstall torquebox from scratch.
Source the (stable) functions:
source <(curl https://raw.github.com/DrTom/debuntu_setup_scripts/master/bin/debuntu_fun.sh)
Alternatively source from the wip (work in progress) branch:
source <(curl https://raw.github.com/DrTom/debuntu_setup_scripts/wip/bin/debuntu_fun.sh)
See which scripts are available:
declare -F | grep debuntu
Have a closer look at one of them:
declare -f debuntu_system_setup_vim
> debuntu_system_setup_vim ()
> {
> apt-get install --assume-yes vim-nox;
> update-alternatives --set editor /usr/bin/vim.nox
> }
Invoke it:
debuntu_system_setup_vim
You can invoke a function as some other user:
debuntu_invoke_as_user thomas debuntu_ruby_rbenv_install_jruby_1.7.4
The originating user must have permissions to substitute the user identity via
su
. The target user should have set bash
as his default login shell.
The call-graph (direct link) shows an overview of the functions invoking each other. This comes handy to prevent errors when functions are renamed, removed, or the signature is changed.
The visualization can be rebuild by invoking ./doc/build_call_graph.rb
from
the top-level directory. It requires ruby
, some ruby libraries, and
Graphwiz.
-
bin/debuntu_fun.sh
is generated from the scripts (not functions!) located insrc
. -
Invoking
build
will perform the generation. -
build
requires an installed ruby interpreter but it is very simple. Any ruby version will do!