Shell-tools: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
(19 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
=Overview= | =Overview= | ||
A collection of ready-to-use command line tools. Includes <tt>searchjar</tt>, <tt>setw</tt>/<tt>cdw</tt>, etc. Can be used both on Linux and Cygwin systems. | A collection of ready-to-use command line tools. Includes <tt>searchjar</tt>, <tt>setw</tt>/<tt>cdw</tt>, <tt>lims</tt>, etc. Can be used both on Linux and Cygwin systems. | ||
=Configure a Script to Use the Libraries= | |||
<syntaxhighlight lang='bash'> | |||
#!/usr/bin/env bash | |||
[[ -z "${SHLIB_DIR}" ]] && { echo "[error]: SHLIB_DIR not defined" 1>&2; exit 1; } | |||
[[ -f ${SHLIB_DIR}/std.shlib ]] && . ${SHLIB_DIR}/std.shlib || { echo "[error]: ${SHLIB_DIR}/std.shlib not found" 1>&2; exit 1; } | |||
</syntaxhighlight> | |||
=std.shlib= | |||
<font color=red> | |||
'''TODO''' | |||
On 04/04/16 a standalone <tt>std.shlib</tt> project was created. At that time, <tt>em</tt> contained its own version of <tt>std.shlib</tt>. Must migrate <tt>em</tt> to use the separated one. See [[std.shlib]]. | |||
</font> | |||
=GitHub= | =GitHub= | ||
{{External|https://github.com/NovaOrdis/shell-tools}} | |||
To clone: | To clone: | ||
Line 18: | Line 34: | ||
git clone git@github.com:NovaOrdis/shell-tools.git | git clone git@github.com:NovaOrdis/shell-tools.git | ||
</pre> | </pre> | ||
=Tools= | |||
* <tt>cdw</tt>/<tt>getw</tt> | |||
* <tt>searchjar</tt> | |||
* <tt>rename-intellij</tt> | |||
* <tt>lims</tt> | |||
* <tt>[[mac-setup]]</tt> | |||
* b, t, d, r | |||
=Installation= | |||
<pre> | |||
cd ~/bin | |||
git clone git@github.com:NovaOrdis/shell-tools.git | |||
</pre> | |||
Alternatively, read only access is available for an arbitrary Git account: | |||
<pre> | |||
git clone https://<git-account>@github.com/NovaOrdis/shell-tools.git | |||
</pre> | |||
Then edit <tt>~/.bashrc</tt> as follows: | |||
<syntaxhighlight lang='bash'> | |||
... | |||
# | |||
# shell-tools | |||
# | |||
alias cdw='. cdwi' | |||
export PATH=~/bin/shell-tools:${PATH} | |||
</syntaxhighlight> | |||
=lib= | |||
Contains <code>bash.shlib</code>, <code>java.shlib</code>, etc. | |||
==lib Usage== | |||
Other libraries should not source libraries. Only the top level scripts should source libraries: all dependency libraries should be sourced. Currently there is no automatic mechanism that will enforce that. If libraries are missing, there will be errors like: | |||
<syntaxhighlight lang='bash'> | |||
./something | |||
./lib/vagrant.shlib: line 10: check-bash-version: command not found | |||
./lib/vagrant.shlib: line 11: process-common-arguments: command not found | |||
./lib/vagrant.shlib: line 11: error: command not found | |||
</syntaxhighlight> | |||
=TODO= | |||
{{Internal|shell-tools TODO|shell-tools TODO}} |
Latest revision as of 02:41, 23 November 2019
Internal
Overview
A collection of ready-to-use command line tools. Includes searchjar, setw/cdw, lims, etc. Can be used both on Linux and Cygwin systems.
Configure a Script to Use the Libraries
#!/usr/bin/env bash
[[ -z "${SHLIB_DIR}" ]] && { echo "[error]: SHLIB_DIR not defined" 1>&2; exit 1; }
[[ -f ${SHLIB_DIR}/std.shlib ]] && . ${SHLIB_DIR}/std.shlib || { echo "[error]: ${SHLIB_DIR}/std.shlib not found" 1>&2; exit 1; }
std.shlib
TODO
On 04/04/16 a standalone std.shlib project was created. At that time, em contained its own version of std.shlib. Must migrate em to use the separated one. See std.shlib.
GitHub
To clone:
git clone git@github.com:NovaOrdis/shell-tools.git
Tools
- cdw/getw
- searchjar
- rename-intellij
- lims
- mac-setup
- b, t, d, r
Installation
cd ~/bin git clone git@github.com:NovaOrdis/shell-tools.git
Alternatively, read only access is available for an arbitrary Git account:
git clone https://<git-account>@github.com/NovaOrdis/shell-tools.git
Then edit ~/.bashrc as follows:
...
#
# shell-tools
#
alias cdw='. cdwi'
export PATH=~/bin/shell-tools:${PATH}
lib
Contains bash.shlib
, java.shlib
, etc.
lib Usage
Other libraries should not source libraries. Only the top level scripts should source libraries: all dependency libraries should be sourced. Currently there is no automatic mechanism that will enforce that. If libraries are missing, there will be errors like:
./something
./lib/vagrant.shlib: line 10: check-bash-version: command not found
./lib/vagrant.shlib: line 11: process-common-arguments: command not found
./lib/vagrant.shlib: line 11: error: command not found