Commit 9cc5237b authored by Steve Goering's avatar Steve Goering

add betamng functions

parent a3442678
......@@ -26,7 +26,7 @@ CheckCodeConvetions() {
# code conventions
logInfo "check code conventions"
project_path=$(readlink -f -- "$scriptPath"/../../)
for i in $(find $project_path -name "*.py")
for i in $(find $project_path -name "*.py" | grep -v "pssh")
do
logInfo "check $i "
# ignore just this stupid 80 char long lines rule
......
......@@ -24,19 +24,21 @@ Description:
Examples:
$(basename "$0")
Authors:
Steve Göring"
"
exit 1
}
#
# Todo.
#
#
main() {
logInfo "install it"
logInfo "Install webis to path."
logWarn "Sudo required."
webiscmdpath="$(readlink -f -- $scriptPath/../../)/"
logDebug "$webiscmdpath"
sudo ln -s "$webiscmdpath/webis.py" "/usr/bin/webis"
}
#
......
......@@ -31,10 +31,16 @@ Authors:
}
#
# Todo.
#
#
main() {
echo "remove it"
logInfo "Remove webis from path."
logWarn "Sudo required."
if [ -L "/usr/bin/webis" ]; then
sudo unlink "/usr/bin/webis"
fi
}
#
......
......@@ -35,7 +35,7 @@ Authors:
#
main() {
rootpath="$(readlink -f -- $scriptPath/../../)/"
echo $(find $rootpath -regex ".*\(py\|sh\)" | sort | xargs cat | md5sum | awk '{print $1}')
echo $(find $rootpath -type f -regex ".*\(py\|sh\)" | sort | xargs cat | md5sum | awk '{print $1}')
}
#
......
......@@ -73,8 +73,15 @@ def handle_script(submodul, scriptfile, params=[]):
"""
lInfo("start script")
lDbg("run: " + submodul + ", path: " + scriptfile)
"""
with this call, stdin and stdout is not simulatnious visible
output = shell_call([scriptfile] + params)
lInfo("output: \n" + output)
lInfo("output: \n" + output)"""
lInfo("output:")
os.system(" ".join([scriptfile] + params))
lInfo("done")
# todo "return code"
return 0
......@@ -117,8 +124,10 @@ def main(args):
submodules = get_submodules(config, modules[argsdict["modul"]])
if argsdict["submodul"] == "help":
lHelp("submodules of " + argsdict["modul"])
max_size = len(max(submodules.keys(), key=len))
format_str = "{:<" + str(max_size) + "}"
for sub in sorted(submodules.keys()):
lHelp(" " + sub + " : " + get_submodule_description(submodules[sub]))
lHelp(" " + format_str.format(sub) + " : " + get_submodule_description(submodules[sub]))
return 0
if argsdict["submodul"] not in submodules:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment