Giter Site home page Giter Site logo

tpcp's People

Contributors

hologos avatar

Watchers

 avatar  avatar  avatar

tpcp's Issues

Cleaning of temp files (workdir) is missing in traps

I removed calling of tpcp::utils::cleanup() in traps but don't remember the exact reason. It had something to do with my shell (zsh) automatically calling traps even on successful execution of the script. Need more investigating.

Fix array usage without "

Looping over an array not declared with " can split the element into multiple values. The same goes for passing array as argument.

Domain controller gets cached twice

Right now, if domain controller is cached, it gets cached twice:

[23.11.2019 14:11:57] D: AED: Caching transport domain for AED.
[23.11.2019 14:11:58] D: AED: Transport domain for AED is AED.
[23.11.2019 14:11:58] D: AED: Caching transport domain for domain controller AED.

Initialize all variables used in for loop.

Not all variables are initialized for use in for loop. Bash doesn't initialize variable used in for loop definition and it can cause some serious bugs.

local lang=""

for lang in "${langs[@]}"; do
    ....
done

vs

for lang in "${langs[@]}"; do
    ....
done

Don't copy files to target system if transport source is in the same transport domain

If I want to copy transport files to multiple systems (and some are in the same transport domain), don't copy the files. They would be overwritten and it could corrupt them.

For example, I want to do everything with a single command:

  • add, import and delete transport to AA* systems
  • copy, add, import and delete transport to BB* systems
# AA0, AA1, AA2 are in the same transport domain
tpcp AA0K999999 AA1000 AA2000 BB1000 BB2000 CPY ADD IMP DEL

                          CPY ADD IMP DEL
AA0K999999     AA1000      -   ✔   ✔   ✔
               AA2000      -   ✔   ✔   ✔
               BB1000      ✔   ✔   ✔   ✔
               BB2000      ✔   ✔   ✔   ✔

Test the program under bash v4.4

I found in bash v5.0 release notes the following:

  1. New Features in Bash
    ...
    m. If a non-interactive shell with job control enabled detects that a foreground
    job died due to SIGINT, it acts as if it received the SIGINT.

It might mean that my recent fix for killing background jobs work only in bash v5.0, which I tested it on.

Input parser doesn't recognize missing parameters

$ TPCP_LOGGER_LEVEL=D ./tpcp AADK000001
[25.11.2019 15:28:08] I: Creating log directory './tpcp-logs/debug'.

Loading system informations from /Users/malekjir/.config/tpcp/system-definition.ini.

Caching information about transport domains.
./libs/saptransport: line 24: !2: unbound variable
./libs/saptransport: line 366: /tmp/tpcp.20191125-152808.9489.26601/saptransport_status.*: No such file or directory



Logs are located at ./tpcp-logs/debug.

Print info about transport progress to main.log

Currently the main.log doesn't contain information about progress of transports with default logger level. I want to see at glance, what transports and to what systems were those processed and their final status.

DEL ends with error if transport is not in an import queue

To be able to add all transports in an order, I have to first run DEL action, then ADD action. If some transport is not in an import queue, it then ends with an error. Running DEL on transport not in an import queue should be "soft" error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.