Skip to content

Commit

Permalink
Add new helper scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
smoretti committed Mar 9, 2022
1 parent 2280be5 commit 2b1e5cc
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
8 changes: 8 additions & 0 deletions bin/all_tests
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

export DEFAULT_PATH=/usr/local/MNXtools
export OS_PATH='docker run --mount type=bind,source=/tmp/MNXtools_test,target=/tmp/MNXtools_test --rm -i -t sibswiss/mnxtools'
$DEFAULT_PATH/test/ALLTESTS.sh

exit 0

39 changes: 39 additions & 0 deletions bin/doc
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/usr/bin/env perl

use strict;
use warnings;
use diagnostics;

use FindBin qw( $RealBin );
use lib "$RealBin/../perl";

my $arg = $ARGV[0] || help();


if ( $arg eq 'help' || $arg eq 'h' ){
help();
}
elsif ( $arg eq 'yaml' ){
system("cat $RealBin/../doc/convert_manual.md");
exit 0;
}
else {
warn "\n\tInvalid argument\n\n";
exit 1;
}

exit 0;

sub help {
my $cmd = $0;
$cmd =~ s{^.*/}{};

print "\n\t$cmd <argument>
\targuments:
\tyaml Help about convert codes found in convert_log.yaml
\thelp Display this message
\n";
exit 0;
}

3 changes: 2 additions & 1 deletion bin/help
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/sh

cat ../container/mnxtools_help.txt
DIR=`which $0 | sed -e 's@[^/]*$@@'`
cat $DIR/../container/mnxtools_help.txt

exit 0

3 changes: 2 additions & 1 deletion test/ALLTESTS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ mkdir -p $TMP
chmod a+wrx $TMP
#NOTE to use binaries and cache from the container:
# export DEFAULT_PATH=/usr/local/MNXtools
# export OS_PATH='docker run --name mnxtools --mount type=bind,source=/tmp/MNXtools_test,target=/tmp/MNXtools_test --rm -i -t sibswiss/mnxtools'
# export OS_PATH='docker run --mount type=bind,source=/tmp/MNXtools_test,target=/tmp/MNXtools_test --rm -i -t sibswiss/mnxtools'
export MNX_OS_PATH=''
export MNX_DEFAULT_PATH=..

cd ${DEFAULT_PATH:=$MNX_DEFAULT_PATH}/test/
for PERL in perl;
do
for MNET in \
Expand Down

0 comments on commit 2b1e5cc

Please sign in to comment.