summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Bauer2014-08-25 16:29:38 +0200
committerJonathan Bauer2014-08-25 16:29:38 +0200
commitdcd692a1da316d2babbe4d5a7778dc76911b0ac5 (patch)
treecb1ddaae225f91fd1fc4ce643c153848c84fceb1
parent[pvs2] fix missing qt-plugin for decoding jpeg thumbs (diff)
parent[zsh-completion] 'mltk -n' now shows list of existing folders in /export (diff)
downloadtm-scripts-dcd692a1da316d2babbe4d5a7778dc76911b0ac5.tar.gz
tm-scripts-dcd692a1da316d2babbe4d5a7778dc76911b0ac5.tar.xz
tm-scripts-dcd692a1da316d2babbe4d5a7778dc76911b0ac5.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
-rw-r--r--doc/boot_config_vars3
-rw-r--r--useful/zsh-completion/README30
-rw-r--r--useful/zsh-completion/openslx/_mltk44
-rw-r--r--useful/zsh-completion/openslx/_openslx45
-rw-r--r--useful/zsh-completion/openslx/openslx.plugin.zsh0
5 files changed, 122 insertions, 0 deletions
diff --git a/doc/boot_config_vars b/doc/boot_config_vars
index 42e4b17a..36293d87 100644
--- a/doc/boot_config_vars
+++ b/doc/boot_config_vars
@@ -35,6 +35,9 @@ Addon related variables:
SLX_ADDONS Space separated list of sqfs-modules to load.
Example: 'vmware vbox debug'.
+VMWare related variables:
+SLX_VMWARE_3D Boolean, sets 'mks.gl.allowBlacklistedDrivers'
+
Client root password related variables:
SLX_ROOT_PASS Expects a (salted) sha-512 password hash.
Such hashes can be created using "mkpasswd -m sha-512".
diff --git a/useful/zsh-completion/README b/useful/zsh-completion/README
new file mode 100644
index 00000000..690e9e6b
--- /dev/null
+++ b/useful/zsh-completion/README
@@ -0,0 +1,30 @@
+This is a Completion Plugin for Oh-My-ZSH.
+It faciliates the handling of the openslx and mltk command line tools by
+showing available options, targets, module, hosts and configs on tab press.
+
+#Install
+To use it, just place the folder 'openslx' under "~/.oh-my-zsh/plugins/",
+fire up a new zsh-session, switch to your tm-script directory and the
+completion should be working.
+
+#Optional
+The following lines can be added to your ~/.zshrc file
+They are not really necessary for the completion to work, but will make
+the completion functions more verbose.
+-------------------------------------------------------------
+zstyle ':completion:*' verbose yes
+zstyle ':completion:*:descriptions' format '%B%d%b'
+zstyle ':completion:*:messages' format '%d'
+zstyle ':completion:*:warnings' format 'No matches for: %d'
+zstyle ':completion:*' group-name ”
+-------------------------------------------------------------
+
+#Development
+With the following command you can quickly test changes you did to the
+completion functions without having to reopen a new session every time.
+For example to reload the completion function for _mltk:
+
+$ unfunction _mltk && autoload -U _mltk
+
+#Futher Information
+http://zsh.sourceforge.net/Doc/Release/Completion-System.html
diff --git a/useful/zsh-completion/openslx/_mltk b/useful/zsh-completion/openslx/_mltk
new file mode 100644
index 00000000..5abf68f3
--- /dev/null
+++ b/useful/zsh-completion/openslx/_mltk
@@ -0,0 +1,44 @@
+#compdef mltk
+#autoload
+
+typeset -A opt_args
+local context state state_descr line expl
+
+_mltk_target_modules() {
+ target_modules=(`ls remote/targets/$1`)
+}
+
+local -a _targets target_modules export_dirs
+_targets=(`ls remote/targets`)
+
+[ -d "/export" ] && export_dirs=(`ls /export`)
+
+_arguments \
+ "--help[display help text]: :->help" \
+ "(: -)-n[-n \[name\] bind mount all the local builds (remote/builds) to /export/builds or /export/\[name\]]:Existing folders in /export:($export_dirs)" \
+ "*:: :->target" && return 0
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "mltk Targets" _targets
+ return
+fi
+
+case "$state" in
+ target)
+ _mltk_target_modules $words[1]
+ _arguments \
+ "-c[-c \[module\]* clean build directory of module(s) and target dir]:*: :->modules" \
+ "-b[-b \[module\]* build module(s) and copy them to the target build directory]:*: :->modules" \
+ "-d[activates debug output for the task (spamy)]" \
+ && return 0
+
+
+ if [[ "$state" == modules ]]; then
+ _arguments \
+ "-c[-c \[module\]* clean build directory of module(s) and target dir]" \
+ "-b[-b \[module\]* build module(s) and copy them to the target build directory]" \
+ "-d[activates debug output for the task (spamy)]: :->debug" \
+ "*:Modules in Target $words[1]:($target_modules)" && return 0
+ fi
+ ;;
+esac
diff --git a/useful/zsh-completion/openslx/_openslx b/useful/zsh-completion/openslx/_openslx
new file mode 100644
index 00000000..f19f4973
--- /dev/null
+++ b/useful/zsh-completion/openslx/_openslx
@@ -0,0 +1,45 @@
+#compdef openslx
+#autoload
+
+typeset -A opt_args
+local context state state_descr line expl
+
+_openslx_targets() {
+ targets=(`ls server/local_builds/$1`)
+}
+
+local -a targets _local_builds configs
+_local_builds=(`ls server/local_builds/`)
+configs=(`ls server/configs/`)
+
+_arguments \
+ "--help[display help text]: :->help" \
+ "*:: :->remotehost" && return 0
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "Existing Remote Hosts" _local_builds
+ return
+fi
+
+case "$state" in
+ remotehost)
+ _openslx_targets $words[1]
+ [[ "$targets" == "server/local_builds/local" ]] && unset targets
+
+ _arguments \
+ "(-k :)-s[sync 'builds' from remote host]" \
+ "(-s :)-k[-k <config> - generate config file server/boot/<remotehost>/configs/<configname>/config.tgz]:Available Configs:($configs)" \
+ "(:)-d[activates debug output for the task (spamy)]" \
+ "(-)*: :->target" \
+ && return 0
+
+ if [[ "$state" == target ]]; then
+ _arguments \
+ "-e[-e type - export target as 'type'. can be 'cpio' (simple initramfs) or 'sqfs' (squashfs)]:Export Type:(sqfs cpio)" \
+ "-s[sync 'builds' from remote host]" \
+ "-c[clean target in server/local_builds/ and corresponding files under boot/]" \
+ "-d[activates debug output for the task]" \
+ ":Targets on Host $words[1]:($targets)"
+ fi
+ ;;
+esac
diff --git a/useful/zsh-completion/openslx/openslx.plugin.zsh b/useful/zsh-completion/openslx/openslx.plugin.zsh
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/useful/zsh-completion/openslx/openslx.plugin.zsh