Skip to content

Commit

Permalink
Merge pull request #12 from vroncevic/dev
Browse files Browse the repository at this point in the history
[check_mysqldb] refactor done based on latest sh_util, updated docs
  • Loading branch information
vroncevic committed Jun 7, 2021
2 parents 509b6cf + 0a9b112 commit d329078
Show file tree
Hide file tree
Showing 33 changed files with 114 additions and 245 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions .github/workflows/check_mysqldb_docker_checker.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: check_mysqldb docker checker

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check_mysqldb_shell_checker.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: check_mysqldb shell checker

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/check_mysqldb_toc.yaml → .github/workflows/check_mysqldb_toc.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: check_mysqldb toc

on: push

jobs:
generateTOC:
name: TOC Generator
Expand Down
Empty file modified .gitignore
100755 → 100644
Empty file.
Empty file modified .readthedocs.yml
100755 → 100644
Empty file.
17 changes: 9 additions & 8 deletions Dockerfile
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

FROM debian:10
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
RUN DEBIAN_FRONTEND=noninteractive \
apt-get install -yq --no-install-recommends \
tree \
htop \
wget \
Expand All @@ -25,14 +26,14 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends \
default-mysql-server-core \
default-mysql-server

RUN wget https://github.com/vroncevic/sh_util/archive/v1.0.0.zip
RUN unzip v1.0.0.zip
RUN find /sh_util-1.0.0/ -name "*.editorconfig" -type f -exec rm -Rf {} \;
RUN wget https://github.com/vroncevic/sh_util/archive/v1.0.zip
RUN unzip v1.0.zip
RUN find /sh_util-1.0/ -name "*.editorconfig" -type f -exec rm -Rf {} \;
RUN mkdir -p /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0.0/sh_tool/bin/ /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0.0/sh_tool/conf/ /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0.0/sh_tool/log/ /root/scripts/sh_util/ver.1.0/
RUN rm -Rf v1.0.0.zip sh_util-1.0.0
RUN cp -R /sh_util-1.0/sh_tool/bin/ /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0/sh_tool/conf/ /root/scripts/sh_util/ver.1.0/
RUN cp -R /sh_util-1.0/sh_tool/log/ /root/scripts/sh_util/ver.1.0/
RUN rm -Rf v1.0.zip sh_util-1.0
RUN mkdir /sh_tool/
COPY sh_tool /sh_tool/
RUN find /sh_tool/ -name "*.editorconfig" -type f -exec rm -Rf {} \;
Expand Down
Empty file modified LICENSE
100755 → 100644
Empty file.
16 changes: 9 additions & 7 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<img align="right" src="https://raw.githubusercontent.com/vroncevic/check_mysqldb/dev/docs/check_mysqldb_logo.png" width="25%">

# Checking MySQL DB

**check_mysqldb** is shell tool for checking **[MySQL database](https://mariadb.org/)**.
Expand Down Expand Up @@ -32,11 +34,11 @@ Navigate to release **[page](https://github.com/vroncevic/check_mysqldb/releases
To install **check_mysqldb** type the following:

```
tar xvzf check_mysqldb-x.y.z.tar.gz
cd check_mysqldb-x.y.z
cp -R ~/sh_tool/bin/ /root/scripts/check_mysqldb/ver.1.0/
cp -R ~/sh_tool/conf/ /root/scripts/check_mysqldb/ver.1.0/
cp -R ~/sh_tool/log/ /root/scripts/check_mysqldb/ver.1.0/
tar xvzf check_mysqldb-x.y.tar.gz
cd check_mysqldb-x.y
cp -R ~/sh_tool/bin/ /root/scripts/check_mysqldb/ver.x.y/
cp -R ~/sh_tool/conf/ /root/scripts/check_mysqldb/ver.x.y/
cp -R ~/sh_tool/log/ /root/scripts/check_mysqldb/ver.x.y/
```
![alt tag](https://raw.githubusercontent.com/vroncevic/check_mysqldb/dev/docs/setup_tree.png)

Expand All @@ -48,7 +50,7 @@ Or You can use docker to create image/container.

```
# Create symlink for shell tool
ln -s /root/scripts/check_mysqldb/ver.1.0/bin/check_mysqldb.sh /root/bin/check_mysqldb
ln -s /root/scripts/check_mysqldb/ver.x.y/bin/check_mysqldb.sh /root/bin/check_mysqldb
# Setting PATH
export PATH=${PATH}:/root/bin/
Expand All @@ -68,7 +70,7 @@ check_mysqldb database_name

Code structure:
```
.
sh_tool/
├── bin/
│   └── check_mysqldb.sh
├── conf/
Expand Down
9 changes: 1 addition & 8 deletions docs/Makefile
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/build/doctrees/index.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: b5dfb2dd884b6fa267c0b73420402d9a
config: b88818b5eab60411b70291378493865b
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion docs/build/html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Code structure:

.. code-block:: bash
.
sh_tool/
├── bin/
│ └── check_mysqldb.sh
├── conf/
Expand Down
80 changes: 39 additions & 41 deletions docs/build/html/_static/jquery.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2019-04-19T06:52Z
* Date: 2021-03-09T19:42Z
*/
( function( global, factory ) {

Expand Down Expand Up @@ -4676,11 +4676,40 @@ var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i );



// We have to close these tags to support XHTML (#13200)
var wrapMap = {
( function() {
var fragment = document.createDocumentFragment(),
div = fragment.appendChild( document.createElement( "div" ) ),
input = document.createElement( "input" );

// Support: Android 4.0 - 4.3 only
// Check state lost if the name is set (#11217)
// Support: Windows Web Apps (WWA)
// `name` and `type` must use .setAttribute for WWA (#14901)
input.setAttribute( "type", "radio" );
input.setAttribute( "checked", "checked" );
input.setAttribute( "name", "t" );

div.appendChild( input );

// Support: Android <=4.1 only
// Older WebKit doesn't clone checked state correctly in fragments
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

// Support: IE <=11 only
// Make sure textarea (and checkbox) defaultValue is properly cloned
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;

// Support: IE <=9 only
option: [ 1, "<select multiple='multiple'>", "</select>" ],
// IE <=9 replaces <option> tags with their contents when inserted outside of
// the select element.
div.innerHTML = "<option></option>";
support.option = !!div.lastChild;
} )();


// We have to close these tags to support XHTML (#13200)
var wrapMap = {

// XHTML parsers do not magically insert elements in the
// same way that tag soup parsers do. So we cannot shorten
Expand All @@ -4693,12 +4722,14 @@ var wrapMap = {
_default: [ 0, "", "" ]
};

// Support: IE <=9 only
wrapMap.optgroup = wrapMap.option;

wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;

// Support: IE <=9 only
if ( !support.option ) {
wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ];
}


function getAll( context, tag ) {

Expand Down Expand Up @@ -4829,32 +4860,6 @@ function buildFragment( elems, context, scripts, selection, ignored ) {

return fragment;
}


( function() {
var fragment = document.createDocumentFragment(),
div = fragment.appendChild( document.createElement( "div" ) ),
input = document.createElement( "input" );

// Support: Android 4.0 - 4.3 only
// Check state lost if the name is set (#11217)
// Support: Windows Web Apps (WWA)
// `name` and `type` must use .setAttribute for WWA (#14901)
input.setAttribute( "type", "radio" );
input.setAttribute( "checked", "checked" );
input.setAttribute( "name", "t" );

div.appendChild( input );

// Support: Android <=4.1 only
// Older WebKit doesn't clone checked state correctly in fragments
support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;

// Support: IE <=11 only
// Make sure textarea (and checkbox) defaultValue is properly cloned
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
} )();
var documentElement = document.documentElement;


Expand Down Expand Up @@ -5591,13 +5596,6 @@ jQuery.fn.extend( {

var

/* eslint-disable max-len */

// See https://github.com/eslint/eslint/issues/3229
rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,

/* eslint-enable */

// Support: IE <=10 - 11, Edge 12 - 13 only
// In IE/Edge using regex groups here causes severe slowdowns.
// See https://connect.microsoft.com/IE/feedback/details/1736512/
Expand Down Expand Up @@ -5794,7 +5792,7 @@ function remove( elem, selector, keepData ) {

jQuery.extend( {
htmlPrefilter: function( html ) {
return html.replace( rxhtmlTag, "<$1></$2>" );
return html;
},

clone: function( elem, dataAndEvents, deepDataAndEvents ) {
Expand Down
23 changes: 19 additions & 4 deletions docs/build/html/_static/underscore.js
Original file line number Diff line number Diff line change
Expand Up @@ -1550,6 +1550,13 @@
return '\\' + escapes[match];
};

// In order to prevent third-party code injection through
// `_.templateSettings.variable`, we test it against the following regular
// expression. It is intentionally a bit more liberal than just matching valid
// identifiers, but still prevents possible loopholes through defaults or
// destructuring assignment.
var bareIdentifier = /^\s*(\w|\$)+\s*$/;

// JavaScript micro-templating, similar to John Resig's implementation.
// Underscore templating handles arbitrary delimiters, preserves whitespace,
// and correctly escapes quotes within interpolated code.
Expand Down Expand Up @@ -1585,16 +1592,25 @@
});
source += "';\n";

// If a variable is not specified, place data values in local scope.
if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
var argument = settings.variable;
if (argument) {
// Insure against third-party code injection.
if (!bareIdentifier.test(argument)) throw new Error(
'variable is not a bare identifier: ' + argument
);
} else {
// If a variable is not specified, place data values in local scope.
source = 'with(obj||{}){\n' + source + '}\n';
argument = 'obj';
}

source = "var __t,__p='',__j=Array.prototype.join," +
"print=function(){__p+=__j.call(arguments,'');};\n" +
source + 'return __p;\n';

var render;
try {
render = new Function(settings.variable || 'obj', '_', source);
render = new Function(argument, '_', source);
} catch (e) {
e.source = source;
throw e;
Expand All @@ -1605,7 +1621,6 @@
};

// Provide the compiled source as a convenience for precompilation.
var argument = settings.variable || 'obj';
template.source = 'function(' + argument + '){\n' + source + '}';

return template;
Expand Down
6 changes: 5 additions & 1 deletion docs/build/html/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@



<div class="version">
1.0
</div>




Expand Down Expand Up @@ -165,7 +169,7 @@ <h1 id="index">Index</h1>
<div role="contentinfo">
<p>

&copy; Copyright 2020, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;
&copy; Copyright 2016, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;

</p>
</div>
Expand Down
8 changes: 6 additions & 2 deletions docs/build/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@



<div class="version">
1.0
</div>




Expand Down Expand Up @@ -184,7 +188,7 @@ <h1>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to t
<h1>Shell tool structure<a class="headerlink" href="#shell-tool-structure" title="Permalink to this headline"></a></h1>
<p><strong>check_mysqldb</strong> is based on MOP.</p>
<p>Code structure:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>.
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>sh_tool/
├── bin/
│ └── check_mysqldb.sh
├── conf/
Expand Down Expand Up @@ -227,7 +231,7 @@ <h1>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Pe
<div role="contentinfo">
<p>

&copy; Copyright 2020, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;
&copy; Copyright 2016, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;

</p>
</div>
Expand Down
Binary file modified docs/build/html/objects.inv
Binary file not shown.
6 changes: 5 additions & 1 deletion docs/build/html/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@



<div class="version">
1.0
</div>




Expand Down Expand Up @@ -171,7 +175,7 @@
<div role="contentinfo">
<p>

&copy; Copyright 2020, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;
&copy; Copyright 2016, Vladimir Roncevic &lt;elektron.ronca@gmail.com&gt;

</p>
</div>
Expand Down
Binary file added docs/check_mysqldb_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions docs/make.bat
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
Expand Down
Empty file modified docs/setup_tree.png
100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d329078

Please sign in to comment.