Posts

Showing posts with the label bash

Splitting Long Strings and Commands in Bash

ns=my_ns my_pod=pod-of-mine zuza='oppa doppa' # As a direct command. kubectl -n $ns exec $my_pod -- sh -c ' \ val="tram '"$zuza"' pam"; \ echo gu '"$zuza"' ga; \ echo la la "$val" la la;' # As a string command. # But use back-slash to make single line commands. my_command=' val="tram '$zuza' pam"; echo '$zuza' we use backslash here to make single line command \ echo la la "$val" la la;' kubectl -n $ns exec $my_pod -- sh -c "$my_command" The same on Gist Github

Cheat-sheet of implementation for Pure Git with Convention over Git

This is a cheat-sheet for a simplest implementation of the Convention over Git  and of the  pure Git and the Convention over Git . This is used for an automated synchronization between remote Git repositories. (Consider to use  git-sinc , the next generation of remote Git repositories synchronization.) If you understand the idea of the Convention over Git , then it is easier to look at this cheat-sheet. Otherwise look at the Convention over Git  article and on the project's home page . Here we'll start. Let's say some two development teams in companies "A -1 " and "B -2 " want to auto-synchronize a Git-repository named " repo " with each other. We have some preconditions: The teams want to synchronize only conventionally named branches. Not the entire repository, which is also possible. GitLab of one of the teams automatically blocks tags deletion. So, they decided to exclude Git-tags from syncing. Guys have no time for optimizati...