diff --git a/.gt/remotes/tegonal-scripts/pulled.tsv b/.gt/remotes/tegonal-scripts/pulled.tsv index 45c487e..d1a8345 100644 --- a/.gt/remotes/tegonal-scripts/pulled.tsv +++ b/.gt/remotes/tegonal-scripts/pulled.tsv @@ -1,37 +1,37 @@ #@ Version: 1.1.0 tag file relativeTarget tagFilter sha512 -v3.5.0 src/setup.sh ../lib/tegonal-scripts/src/setup.sh .* c72440ceb9dfffca3feacb4d652f8b6ad1266277a1549b6271a47e1c0fdc0746994cf01a1a0335a95e1c7e93454a1fdade9007d7d2226f20e95e6f52ea0d0fa7 -v3.5.0 src/utility/io.sh ../lib/tegonal-scripts/src/utility/io.sh .* e905f8ec3c0ea6b5d3a3c3a295bab690cc2b9d42ec784d56ec525f24044490c216756e05f6d9312f6379821e3f7208d44990bd8c598e9b268f40cc933951dcc9 -v3.5.0 src/utility/array-utils.sh ../lib/tegonal-scripts/src/utility/array-utils.sh .* 357c47ad757cdd8be932f2c1b6c000c58e5b502fe1d19c921568d736355e04ff01b652b407a0f04664ccfc1c2cfbd8e0b3b8a695521ce0a3a88eb289c8cbaf38 -v3.5.0 src/utility/parse-utils.sh ../lib/tegonal-scripts/src/utility/parse-utils.sh .* 04164299e848f75681497284e5c9b358a62f98d213c60d9f2a576342f7a116a9b1a4acf6a591d1535dfc0351b2f656a3f8c4f838ec8e01611f94c3e0111e46d2 -v3.5.0 src/utility/git-utils.sh ../lib/tegonal-scripts/src/utility/git-utils.sh .* dcbf51d144a2e797df34862e495fcb1a8c0387990c7454158c40f5ebf38d1837a9c75fca09c5fa4ae88905b2d21ceafa3ee657bb6ab2cbc3924dea51e47393b3 -v3.5.0 src/utility/gpg-utils.sh ../lib/tegonal-scripts/src/utility/gpg-utils.sh .* ea15975b230cabcc1d75afea011270b4d5c03e2ea4dda8558bd2060b4a2b4f02d48022019c83b23d85f83fefc7de1a8a87318cda0af7e948c3912aa3d7cda8b7 -v3.5.0 src/utility/log.sh ../lib/tegonal-scripts/src/utility/log.sh .* 3fdea7b78d37c9424602c1d0ff90ff19b7e7d3674d8ad412777754221118851ebdab41c129fb9181110a3639a19712ebf81ed35d4b86314814a53d99bbb2b26f -v3.5.0 src/utility/parse-fn-args.sh ../lib/tegonal-scripts/src/utility/parse-fn-args.sh .* 64b8f1dac3ed9cf860719b40f6e9adfa973096a4754714de20bbb9f42ade1572a754eeea1495a12395529bd71f1d4b280e613a23d26edd7e5546486fe9b9cbb4 -v3.5.0 src/utility/update-bash-docu.sh ../lib/tegonal-scripts/src/utility/update-bash-docu.sh .* a2194e8afba6d70589d3f3aed954e303c956125746ddbdd97beaa0ef015d354ce08949c712cbb80e26a0da52399cb90d8551b9dc60ab2ac890c6d1e8b03318da -v3.5.0 src/utility/parse-args.sh ../lib/tegonal-scripts/src/utility/parse-args.sh .* 18a1b91f8e3aa6c61805ca8a9cf43ac87a817b61032297455aaff198a65b9d2fbfcb7bb3bdac9a940020129694ce2a7997d917e51413e8228dce4265df59a96a -v3.5.0 src/utility/checks.sh ../lib/tegonal-scripts/src/utility/checks.sh .* 1a25b07c8a19b93b5ca91582fb636e9273911fed455de2964a803ac09416201739bcd66eab39a94d9916f8d4a668c5c75bbd8f4b5bf6fb4fdc11b912d056b245 -v3.5.0 src/utility/parse-commands.sh ../lib/tegonal-scripts/src/utility/parse-commands.sh .* 9e2b1a685aa14c574e1421ba6e3155a112dc47c069a09d048ced9f22eb85b400c701239ae5c64f898c384df97d849a008925ca22b67cfba42e89a8c5fc09a16a -v3.5.0 src/utility/replace-snippet.sh ../lib/tegonal-scripts/src/utility/replace-snippet.sh .* 0eaf94a12decc88f3c905290da1b18d0037f6d9fb6908517d3d85ec48972e0ee0288e8de5e2b88fb36e4d24f5ebe8d9a5b819d0afe5c7f35ad778c41b1a3f1d5 -v3.5.0 src/utility/ask.sh ../lib/tegonal-scripts/src/utility/ask.sh .* 4678ad9224783ef52e49e6eb65c16eea902a1a22d28754fd70911b5bceb1810093e6942a57ed473c99a4ae8985b649b569444e16a549a80f102eff97a43d4691 -v3.5.0 src/utility/replace-help-snippet.sh ../lib/tegonal-scripts/src/utility/replace-help-snippet.sh .* 6fb6bd4aacc13cd02889b125642ceb0b7e3cf7032412d692f85fa412f9457873345aa49d53d98fefdd8056f84bc36d0dea4e8f1e6ee4d7adff3de67c23bccc40 -v3.5.0 src/utility/source-once.sh ../lib/tegonal-scripts/src/utility/source-once.sh .* f9464a208738c42754b316328586eb7a5c52cffddb57aa27ce15c4e67889667d4b7df6736a97df5ce0ca64ffe430151c6055f6e0cb53c0057f7111242895394c -v3.5.0 src/utility/recursive-declare-p.sh ../lib/tegonal-scripts/src/utility/recursive-declare-p.sh .* b48bd331c9d3300ab676e969fd8b51bffb409de15b5745f30a7f3867a1a14a50828c5f83e4bc104c5e481261508578903a579986b7e2b7b0f23fe0d5e1ead621 -v3.5.0 src/releasing/sneak-peek-banner.sh ../lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh .* d6411f772297bc2dd7103c4380ae3b9ec56d61bd816d6b9994c22573ce54709b9f5f1299353265a5fbb854b88d4b49a85cd5d46583f117ccaf8d4ed0983b401b -v3.5.0 src/releasing/prepare-files-next-dev-cycle.sh ../lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh .* 9255b2ed8a179ffcf07253d9158fcd5a1ed27b286eab0d66a31e820deba310d0914838778746b9a960b57c6c239e294fbeb59bb6f2d10be47e9dde5cbbfe7df0 -v3.5.0 src/releasing/toggle-sections.sh ../lib/tegonal-scripts/src/releasing/toggle-sections.sh .* 2b908dbbff0f85ff29e3a99c0ab0f53ff9bc827e2043e9755a49578d8aecb249db37853e843f55095ccaf7cf75475bed06a4ceae8b1f502b1dae7c4d3c8fb494 -v3.5.0 src/releasing/update-version-README.sh ../lib/tegonal-scripts/src/releasing/update-version-README.sh .* 68b47f7fb115a1c3ffa7d0b8fa94530b8f763ec8a68ffcf85d063b51d0f521d4c2a2fe90d940e6f7cc33af0bd65a0d3b8e7cec09f1cd50f85df1573065a8653b -v3.5.0 src/releasing/update-version-scripts.sh ../lib/tegonal-scripts/src/releasing/update-version-scripts.sh .* 705324860df286f34013e7e8c020dc6c19ef0d1f70af3ab007118271232e74f055d52553ac797ce72a16584866207a440f63d54701cd92d6fb3661e7fa40d5ce -v3.5.0 src/releasing/release-files.sh ../lib/tegonal-scripts/src/releasing/release-files.sh .* 2f2be9e46d4f8fe9516cd20320ae0d6ffdcf0866e803f0ce309308ad22711d7da7b46ba2540774a9b44961864a718aef25ef7a5f240e50800471d882a1a21223 -v3.5.0 src/qa/run-shellcheck.sh ../lib/tegonal-scripts/src/qa/run-shellcheck.sh .* c4777d0e64ccfdfd96114227ca703668a9938d3c27cd7f931ef10b8eb7cd943c089dc1b83c4508c77fea275e656b0d9e548157b64f68fa55446a344443ef7cce -v3.5.0 src/releasing/update-version-issue-templates.sh ../lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh .* ba3baa7a3fa2f84b0569bddb1e66cf43c4eedfeae8396334b5161f5d45e2d5839ff208d85e9c84c3daa593f52f871983598d52c055dd74741403da5dff3da01f -v3.5.0 src/ci/install-shellcheck.sh ../lib/tegonal-scripts/src/ci/install-shellcheck.sh .* 5dd7f1e67ebe2c1c1ea2e51b6e42ace0cf9c2963781b873d223e279c0df03c64b2781bb67c2d8ad1630915f24145fda3a4ab965250be91f20f9cd0574654563e -v3.5.0 src/releasing/pre-release-checks-git.sh ../lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh .* 81122a9d7d218822c287e634bbf78cdcb1aae2e944e5b138d7c2c886c7c1e7748501c2a0058a038a06b760b8da24cb30c89230bf48bd7ff4934620ab7151bee1 -v3.5.0 src/releasing/release-template.sh ../lib/tegonal-scripts/src/releasing/release-template.sh .* eae68fac4370d4b63e914fab679353cf21cae522c791b918500d7f2637cde39d7651254c76cc147cafd886f82f0d766cb9f3eba92ff41c9ac36b3b315c91bd52 -v3.5.0 src/releasing/deduce-next-version.source.sh ../lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh .* 0c60cf542ca430d7dfff3e73bd7466fd7fe165ad38e49a5f7d3e5aacc8e9e924b8449507d6702661eebe40f32ceeea6a55657fb544cd8e5028957a00db881eaa -v3.5.0 src/releasing/update-version-common-steps.sh ../lib/tegonal-scripts/src/releasing/update-version-common-steps.sh .* b4298d1a20b5edf9786c5c5b7c474a303845b6c9a5809a860ef72d550c0ebb90f500a9e52ed185d2679503417b815cb559a98a9f54eab0817efa7dbedcf2d087 -v3.5.0 src/releasing/common-constants.source.sh ../lib/tegonal-scripts/src/releasing/common-constants.source.sh .* 60558d4d40a479df16ebd2257803cf8c5f1698666d1cd58fbfc64bac87d818cbf8817a9ad4ac05cc4898c576b465755d12e6972cbb619fc68d972b54d2a240d1 -v3.5.0 src/releasing/prepare-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh .* 13df70d8d3aedaac5ab18983fd53bfc0ccffffe4846134a87d5a019150ad146c46aadb22fae3fb1771ce743beaee87d5360e1db679bea6e3062188965751497e -v3.5.0 src/utility/http.sh ../lib/tegonal-scripts/src/utility/http.sh .* ca5c6d738c1ee44bcbd9f9c7ad022e16aba64a42d1473622f85669c8d135063995445d183e8ca94b38d7d61a687ff28f13bbfa76b1d8277e077d84d4251b8bc0 -v3.5.0 src/utility/execute-if-defined.sh ../lib/tegonal-scripts/src/utility/execute-if-defined.sh .* 656e5a5f94c24615b91f91222c11069ef448c8e7a374db68f98c7cfe4fdda01680f228bbbefdf1f426a96207bd80bef404c9bfd0e426983e7825f638d89c5ec9 -v3.5.0 src/utility/cleanups.sh ../lib/tegonal-scripts/src/utility/cleanups.sh .* 71ad826dd0e65b4fee384741e8ddf86fa11c365d39e90be88e934563b905425771f22e64922f81227247eaf6d56843ca7f460e6a7b067b498f6f8289767393c3 +v4.1.0 src/setup.sh ../lib/tegonal-scripts/src/setup.sh .* 367096ca9ecf47b6362334adcef1854b61144583dd38366b62e33c8cb237566e37ccc257e151309ee3fe234d7a4f62b1b8eafb9523291ffcea37e5776e4535fb +v4.1.0 src/utility/io.sh ../lib/tegonal-scripts/src/utility/io.sh .* a2ad3a78707e0b2e526aff11dd1b6e638538e2ff166640e1c4fb4920631e545cab0c4ca2115fe1a84e73ec57af767fb7ce2ca6c490d9bdb2b7d20429c6dd5e23 +v4.1.0 src/utility/array-utils.sh ../lib/tegonal-scripts/src/utility/array-utils.sh .* 6dc55f7c5253487b639a27bf72d26be4fc0e2d5bd0992153eacaacfeba94ca48095ef813739fefb70f463e3f380b81dde2a69fe7d03c65594ee6a1d2e15768f7 +v4.1.0 src/utility/parse-utils.sh ../lib/tegonal-scripts/src/utility/parse-utils.sh .* 5fccddbda4693e8023b29bc6643e9b0007ac8d0fbcbc6ee7bec21e100a07b7494b9f2b859d8d3ec96f55d25c40c5e099ccccb70d2a3b59471ee4809c5d4aa7a4 +v4.1.0 src/utility/git-utils.sh ../lib/tegonal-scripts/src/utility/git-utils.sh .* bc0d26307b727bd9f57cbfd3e985ce03a5c35c8680e3a2e31232f0595ddba623d4bd4407f673726b3d72f794fd59ab7e366a1c61b3b7b019560cce53e8e27b45 +v4.1.0 src/utility/gpg-utils.sh ../lib/tegonal-scripts/src/utility/gpg-utils.sh .* 6285589a9d236d32d9b356cc6b6b2dd9500fb6c1953453037c6553420cc88ba034fc74dc09ba5883308fec20e1195966bf3d0ad434a7fc83a4b5f508377ea5d9 +v4.1.0 src/utility/log.sh ../lib/tegonal-scripts/src/utility/log.sh .* 46f93eb32ec5efa427eaf7123580252e8be1d6e35102bf2086d9029e9ce8710fa241cc92bf91c53468c2c76c0ff29c5925276a8251fa2c86e2307765de52e65f +v4.1.0 src/utility/parse-fn-args.sh ../lib/tegonal-scripts/src/utility/parse-fn-args.sh .* 6a7b9a1155ac735947287aba434a57aa7b7d9f03ed9fd1892534dd997a7bb1a47772aeaf4c3d03abeca6c5488474a98bf5c1ee0d132d54be94d7bcfeaf238166 +v4.1.0 src/utility/update-bash-docu.sh ../lib/tegonal-scripts/src/utility/update-bash-docu.sh .* 0d83945d75de6a5b3b3ebee075f7fc62672a4c3447c583343c14b51f228042ec26415d427ff4051d0d08a0819b203842093c143ab802b875f40c4f92287ebf1e +v4.1.0 src/utility/parse-args.sh ../lib/tegonal-scripts/src/utility/parse-args.sh .* 033fe2e847eddae72e801c5f3bc48f0533908b40ed82a5830be2b99b04d0e8449384db56581b20cc48b5508cb6b9e461ade4f42187dc95a28acdbf764d37f2db +v4.1.0 src/utility/checks.sh ../lib/tegonal-scripts/src/utility/checks.sh .* 51514ae334e1539f239ead23092b0b6232575987ef85b656630f5a4d0276465f8bde18dc7252a32bec524244dc1ba98a21a33b3a4c63c49ac7f4491b10fd767d +v4.1.0 src/utility/parse-commands.sh ../lib/tegonal-scripts/src/utility/parse-commands.sh .* ba03b365515a534d1e90c6e4399267d11c326344e1ca2aeaea2a147d5640c8fc24c758b6d3189871af74e42597941a0e8a9cb81a44969b5d3023dbb487ef2251 +v4.1.0 src/utility/replace-snippet.sh ../lib/tegonal-scripts/src/utility/replace-snippet.sh .* c897db71ec57f0a22af0c20bbcf88e276d960486270f1baaf0c2067fd3b808b21d9fdbc5e6892ac317014af46c353220ce6f7d6769e3d07092514a5c04077c43 +v4.1.0 src/utility/ask.sh ../lib/tegonal-scripts/src/utility/ask.sh .* 9aa040b6ba76226ae78a8fd1b1050a2f3b6a617b148d765fcaf7535d0427944467fbf78d8a5390f240d2277db0da588438209f29a47b2d4b71983907868e191f +v4.1.0 src/utility/replace-help-snippet.sh ../lib/tegonal-scripts/src/utility/replace-help-snippet.sh .* bea5c80ef818f6166c2a4e2fe9a60faf49c89180adcd1e050df847e3dee7ad2a97ccc0b2fc0791822f58b8a117cada7f1aa0a9d4f85063e423b67bf5fdeb4af7 +v4.1.0 src/utility/source-once.sh ../lib/tegonal-scripts/src/utility/source-once.sh .* 2ee912c2084b3a164782f433d99dbb24e58fd486530e4ea68e2ebc23a0e7b20d719bc406ad41e85eb5cd82b0a272beab5f5271a97330182ab779c92904506133 +v4.1.0 src/utility/recursive-declare-p.sh ../lib/tegonal-scripts/src/utility/recursive-declare-p.sh .* ae10280d370761efb5b8f6a8432d36b2416a424abe5396b1e76afc2db123b21fd496a4498882b58b9b68328b840aa93876de1821d898b29b29402d83c0a116bb +v4.1.0 src/releasing/sneak-peek-banner.sh ../lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh .* 548b71ededfec321159f8aa663654d62a1cc48912a5fd0d00e028c5e67d96055396b45598afae67cdd40fce8656cd4174de5f6ebc3a1eac61964f9479e3f6b0a +v4.1.0 src/releasing/prepare-files-next-dev-cycle.sh ../lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh .* e0f96717322f694cb659261995e15431c09404d08dc87a606d534feb666d036a215dfdbb8ca71b44203f1a24ed954a1b8a83666c2ec9f356082e505d78c91395 +v4.1.0 src/releasing/toggle-sections.sh ../lib/tegonal-scripts/src/releasing/toggle-sections.sh .* ccb1cdbe62549f1c41f7eaa42a7d71bc188385b46264add4a7988e5ed977e581e8bc886008c5633086d41c8fa44abdd16563320e511c66172980654e46f928f5 +v4.1.0 src/releasing/update-version-README.sh ../lib/tegonal-scripts/src/releasing/update-version-README.sh .* 00c0747982ad927a8ac9f3aee1a02f189550480287b3479ddb642dbfe4a1c64c98dcf051b8ffdf6296e3a0264084c5ea76363f7b4e638a173444cb147e11dc3c +v4.1.0 src/releasing/update-version-scripts.sh ../lib/tegonal-scripts/src/releasing/update-version-scripts.sh .* d1d3caae523971a6e697ec418112f26498c6671f0b715a4aad168a2472141cacdfc350f25afb45ff907bde0c3425e20ab9f5bbbd04d716b78773968d92a86d3a +v4.1.0 src/releasing/release-files.sh ../lib/tegonal-scripts/src/releasing/release-files.sh .* af849ae1f5cdd2610ff98ee3bae8a6278e2de15a99c341bdf14b09ec74e60bdde2e51014eba8c8f2019a2d667e22418ac122d49a61b736514314a1c3ca036cfa +v4.1.0 src/qa/run-shellcheck.sh ../lib/tegonal-scripts/src/qa/run-shellcheck.sh .* 49974ff2aa3bf73d485e8f091a133689d54a81ae68cc968aa0b4b64dd65a28af5aa376243355537130c1fecb88f89ca1cb33cc4f8e48bdd1c1f2bebb38b76be5 +v4.1.0 src/releasing/update-version-issue-templates.sh ../lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh .* 007801921359ed4979eaaba073624d702b78dc8dde91368d324f9312ebf008cffae0b92dd60426c074bedbcd6f96442670524257a551a5be988fcec81a30ad04 +v4.1.0 src/ci/install-shellcheck.sh ../lib/tegonal-scripts/src/ci/install-shellcheck.sh .* 10c3afa100760db36340f63832fafd25413e71b57dd5209f83b721c656132216477dfa0067e51a3b20b27a9dc6ecfc3d25b852d5004e3180f14a620c5c70f346 +v4.1.0 src/releasing/pre-release-checks-git.sh ../lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh .* 898a2185575dfe3a36211783958fea937e13b711fa897db219833d2067030329c75721dff417e17eb17ebc09c4a8f0ddad86be20687624493082d941bee121c9 +v4.1.0 src/releasing/release-template.sh ../lib/tegonal-scripts/src/releasing/release-template.sh .* 19879c49cea8fd587ab7d1110f657c75118383fea8ce6b0aa339dec4a7cd56042307c01265225a785ac5a74944ac953f2fd3b87158ca8e108785070300dfe5a4 +v4.1.0 src/releasing/deduce-next-version.source.sh ../lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh .* 4d7f5c5e71afbd5b3d47a550d434e1d24558358bff1eb0c0b2e16e6a68f919bd9cf60fa8a0741171135b07ab58a32e54016d33ec177bba46f14b806776416e8b +v4.1.0 src/releasing/update-version-common-steps.sh ../lib/tegonal-scripts/src/releasing/update-version-common-steps.sh .* 82d54d54afc46fc17e5a9bfc37ca12eaed92fd7864c2dacae15b53d408e234ac7dd3a57863efe02eb2fcd56c11c5c8ad5491261029dda7b81ceb2cd5cee64bf1 +v4.1.0 src/releasing/common-constants.source.sh ../lib/tegonal-scripts/src/releasing/common-constants.source.sh .* b2ee9107223783b5fc385b76d0ae67825e8ad7e8da0b7d6a432f960279fff45e4e3112fc502ddb552cbd12f3645476d6b349d200971c46fe997efa6d181c8caf +v4.1.0 src/releasing/prepare-next-dev-cycle-template.sh ../lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh .* 43c1f56d78c9b1f427babc8ee811fb8036f06b9759883d576e77aa2d6a44797f5676e8e7544cafaf82eaeb1b053f5769be4fc65e014a0932b611c0576d66cedf +v4.1.0 src/utility/http.sh ../lib/tegonal-scripts/src/utility/http.sh .* 7f17d69e76a9206da796d52bbe62ed677ccba252ad88cffbafd2736d85cbfcaea23fac8aaa6e7071b67d3c426ebd93feae907de2ff64febf9f1496a9547fe2b5 +v4.1.0 src/utility/execute-if-defined.sh ../lib/tegonal-scripts/src/utility/execute-if-defined.sh .* 8e142cc10d5bc2399c75aba553bdf102279c02f10935f95a671f020308f3a79c6a1badef07041ef29f320bf75c659cb337d23f1c901cefaedc2805e3b2944697 +v4.1.0 src/utility/cleanups.sh ../lib/tegonal-scripts/src/utility/cleanups.sh .* 404741e5ac6446dc1b7a023488f7a4d527c5bb163535a47041486711fec9f36b3be36c3745f8aa058e6cbd898f0284b312f60384f34860f88f4e9493773f73f2 diff --git a/lib/tegonal-scripts/src/ci/install-shellcheck.sh b/lib/tegonal-scripts/src/ci/install-shellcheck.sh index 4e12f8e..909073c 100755 --- a/lib/tegonal-scripts/src/ci/install-shellcheck.sh +++ b/lib/tegonal-scripts/src/ci/install-shellcheck.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # function which searches for *.sh files within defined paths (directories or a single *.sh) and diff --git a/lib/tegonal-scripts/src/qa/run-shellcheck.sh b/lib/tegonal-scripts/src/qa/run-shellcheck.sh index c446cc0..03f9e82 100755 --- a/lib/tegonal-scripts/src/qa/run-shellcheck.sh +++ b/lib/tegonal-scripts/src/qa/run-shellcheck.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # function which searches for *.sh files within defined paths (directories or a single *.sh) and diff --git a/lib/tegonal-scripts/src/releasing/common-constants.source.sh b/lib/tegonal-scripts/src/releasing/common-constants.source.sh index aa24eef..6ad781c 100644 --- a/lib/tegonal-scripts/src/releasing/common-constants.source.sh +++ b/lib/tegonal-scripts/src/releasing/common-constants.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under European Union Public License 1.2 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # constants intended to be sourced into a function diff --git a/lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh b/lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh index 50c144d..9ebe56f 100644 --- a/lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh +++ b/lib/tegonal-scripts/src/releasing/deduce-next-version.source.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # intended to be sourced into a function which expects params version and nextVersion diff --git a/lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh b/lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh index 3cfa493..18b4c39 100755 --- a/lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh +++ b/lib/tegonal-scripts/src/releasing/pre-release-checks-git.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Checks that releasing a certain version (creating a corresponding git tag) makes sense: We check: @@ -34,7 +34,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh b/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh index b383d61..5ca3ed6 100755 --- a/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh +++ b/lib/tegonal-scripts/src/releasing/prepare-files-next-dev-cycle.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Prepare the next dev cycle for files based on conventions: @@ -60,7 +60,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh b/lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh index 1dabd37..c093c98 100755 --- a/lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh +++ b/lib/tegonal-scripts/src/releasing/prepare-next-dev-cycle-template.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Prepares the next dev cycle based on conventions: @@ -61,7 +61,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/release-files.sh b/lib/tegonal-scripts/src/releasing/release-files.sh index 98ceea4..d394176 100755 --- a/lib/tegonal-scripts/src/releasing/release-files.sh +++ b/lib/tegonal-scripts/src/releasing/release-files.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Releasing files based on conventions: @@ -75,7 +75,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/release-template.sh b/lib/tegonal-scripts/src/releasing/release-template.sh index 46637c8..d15f752 100755 --- a/lib/tegonal-scripts/src/releasing/release-template.sh +++ b/lib/tegonal-scripts/src/releasing/release-template.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Defines a release process template where some conventions are defined: @@ -80,7 +80,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh b/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh index cf41488..a38dbb3 100755 --- a/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh +++ b/lib/tegonal-scripts/src/releasing/sneak-peek-banner.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Shows or hides the sneak peek banner @@ -32,7 +32,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/toggle-sections.sh b/lib/tegonal-scripts/src/releasing/toggle-sections.sh index 8b78c29..c007d5f 100755 --- a/lib/tegonal-scripts/src/releasing/toggle-sections.sh +++ b/lib/tegonal-scripts/src/releasing/toggle-sections.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Searches for ... as well as for @@ -36,7 +36,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/update-version-README.sh b/lib/tegonal-scripts/src/releasing/update-version-README.sh index eb42f92..73b51bf 100755 --- a/lib/tegonal-scripts/src/releasing/update-version-README.sh +++ b/lib/tegonal-scripts/src/releasing/update-version-README.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Replaces the version used in download badge(s) and in the sneak peek banner @@ -32,7 +32,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/update-version-common-steps.sh b/lib/tegonal-scripts/src/releasing/update-version-common-steps.sh index 267a8b7..b2b3aa5 100755 --- a/lib/tegonal-scripts/src/releasing/update-version-common-steps.sh +++ b/lib/tegonal-scripts/src/releasing/update-version-common-steps.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Carry out some common update version steps either during releasing or in preparing the next dev cycle (indicated via @@ -56,7 +56,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh b/lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh index 1371674..a5d7ea0 100755 --- a/lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh +++ b/lib/tegonal-scripts/src/releasing/update-version-issue-templates.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Updates the placeholder of all labels named `Affected Version` in issue templates. @@ -32,7 +32,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/releasing/update-version-scripts.sh b/lib/tegonal-scripts/src/releasing/update-version-scripts.sh index 9240474..d2337a3 100755 --- a/lib/tegonal-scripts/src/releasing/update-version-scripts.sh +++ b/lib/tegonal-scripts/src/releasing/update-version-scripts.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Updates the version which is placed before the `Description` section in bash files (line 8 in this file). @@ -32,7 +32,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/setup.sh b/lib/tegonal-scripts/src/setup.sh index bcaa60f..776cfbe 100644 --- a/lib/tegonal-scripts/src/setup.sh +++ b/lib/tegonal-scripts/src/setup.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # script which should be sourced and sets up variables and functions for the scripts diff --git a/lib/tegonal-scripts/src/utility/array-utils.sh b/lib/tegonal-scripts/src/utility/array-utils.sh index 6beacb1..b6577f7 100644 --- a/lib/tegonal-scripts/src/utility/array-utils.sh +++ b/lib/tegonal-scripts/src/utility/array-utils.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # utility functions for dealing with arrays diff --git a/lib/tegonal-scripts/src/utility/ask.sh b/lib/tegonal-scripts/src/utility/ask.sh index 0dfce9d..d7c3db4 100644 --- a/lib/tegonal-scripts/src/utility/ask.sh +++ b/lib/tegonal-scripts/src/utility/ask.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Utility functions to ask the user something via input. diff --git a/lib/tegonal-scripts/src/utility/checks.sh b/lib/tegonal-scripts/src/utility/checks.sh index 6f6cdc0..5e97c03 100644 --- a/lib/tegonal-scripts/src/utility/checks.sh +++ b/lib/tegonal-scripts/src/utility/checks.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Functions to check declarations @@ -74,6 +74,11 @@ # exitIfVariablesNotDeclared myVar4 myVar5 # would exit because myVar5 is not set # echo "myVar4 $myVar4" # +# declare currentDir +# currentDir=$(pwd) +# checkPathNamedIsInsideOf "$myVar4" "source directory" "$currentDir" # same as exitIfPathNamedIsOutsideOf if set -e has an effect on this line +# exitIfPathNamedIsOutsideOf "$myVar4/plugins.txt" "plugins" "$currentDir" +# ################################### set -euo pipefail shopt -s inherit_errexit @@ -310,3 +315,22 @@ function exitIfVariablesNotDeclared() { fi done } + +function checkPathNamedIsInsideOf() { + local path name parentDirectory + # shellcheck disable=SC2034 # is passed by name to parseFnArgs + local -ra params=(path name parentDirectory) + parseFnArgs params "$@" + + local pathAbsolute parentDirectoryAbsolute + pathAbsolute="$(realpath -m "$path")" + parentDirectoryAbsolute="$(realpath -m "$parentDirectory")" + if ! [[ "$pathAbsolute" == "$parentDirectoryAbsolute"* ]]; then + returnDying "the given \033[0;36m%s\033[0m %s is outside of %s" "$name" "$pathAbsolute" "$parentDirectory" || return $? + fi +} + +function exitIfPathNamedIsOutsideOf() { + # shellcheck disable=SC2310 # we are aware of that || will disable set -e for checkIfPathNamedIsOutsideOf + checkPathNamedIsInsideOf "$@" || exit $? +} diff --git a/lib/tegonal-scripts/src/utility/cleanups.sh b/lib/tegonal-scripts/src/utility/cleanups.sh index 30c28a8..cf51990 100644 --- a/lib/tegonal-scripts/src/utility/cleanups.sh +++ b/lib/tegonal-scripts/src/utility/cleanups.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Functions which help in doing cleanup in e.g. scripts/cleanup-on-push-to-main.sh diff --git a/lib/tegonal-scripts/src/utility/execute-if-defined.sh b/lib/tegonal-scripts/src/utility/execute-if-defined.sh index 6c659b5..d139b63 100644 --- a/lib/tegonal-scripts/src/utility/execute-if-defined.sh +++ b/lib/tegonal-scripts/src/utility/execute-if-defined.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Utility functions wrapping printf and prefixing the message with a coloured INFO, WARNING or ERROR. diff --git a/lib/tegonal-scripts/src/utility/git-utils.sh b/lib/tegonal-scripts/src/utility/git-utils.sh index 17f68a3..07f1dde 100644 --- a/lib/tegonal-scripts/src/utility/git-utils.sh +++ b/lib/tegonal-scripts/src/utility/git-utils.sh @@ -5,7 +5,7 @@ # / __/ -_) _ `/ _ \/ _ \/ _ `/ / It is licensed under Apache License 2.0 # \__/\__/\_, /\___/_//_/\_,_/_/ Please report bugs and contribute back your improvements # /___/ -# Version: v3.5.0 +# Version: v4.1.0 # ####### Description ############# # diff --git a/lib/tegonal-scripts/src/utility/gpg-utils.sh b/lib/tegonal-scripts/src/utility/gpg-utils.sh index 56b355d..d81736e 100644 --- a/lib/tegonal-scripts/src/utility/gpg-utils.sh +++ b/lib/tegonal-scripts/src/utility/gpg-utils.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # utility functions for dealing with gpg @@ -22,18 +22,60 @@ # # sourceOnce "$dir_of_tegonal_scripts/utility/gpg-utils.sh" # -# # import public-key.asc into gpg store located at ~/.gpg but ask for confirmation first -# importGpgKey ~/.gpg ./public-key.asc --confirmation=true -# # # import public-key.asc into gpg store located at ~/.gpg and trust automatically -# importGpgKey ~/.gpg ./public-key.asc --confirmation=false +# importGpgKey ~/.gpg ./public-key.asc +# +# # import public-key.asc into gpg store located at ~/.gpg but ask given question first which needs to be answered with yes +# importGpgKey ~/.gpg ./public-key.asc "do you want to import the shown key(s)?" # -# # import public-key.asc into gpg store located at .gt/.gpg and trust automatically -# importGpgKey .gt/.gpg ./public-key.asc --confirmation=false +# # import public-key.asc into gpg store located at .gt/remotes/tegonal-scripts/public-keys/gpg +# # and trust automatically +# importGpgKey .gt/remotes/tegonal-scripts/public-keys/gpg ./public-key.asc # # # trust key which is identified via info@tegonal.com in gpg store located at ~/.gpg # trustGpgKey ~/.gpg info@tegonal.com # +# # get the gpg key data one can retrieve via --list-key --with-colons (pub or sub) for the key which signed the given file +# getSigningGpgKeyData "file.sig" +# +# # get the gpg key data one can retrieve via --list-key --with-colons (pub or sub) for the key which signed the given file +# # but searches the key not in the default gpg store but in .gt/remotes/tegonal-scripts/public-keys/gpg +# getSigningGpgKeyData "file.sig" .gt/remotes/tegonal-scripts/public-keys/gpg +# +# # returns the creation date of the signature +# getSigCreationDate "file.sig" +# +# keyData="sub:-:4096:1:4B78012139378220:..." +# +# # extract the key id from the given key data +# extractGpgKeyIdFromKeyData "$keyData" +# # extract the expiration timestamp from the given key data +# extractExpirationTimestampFromKeyData "$keyData" +# +# # returns with 0 if the given key data (the key respectively) is expired, non-zero otherwise +# isGpgKeyInKeyDataExpired "$keyData" +# # returns with 0 if the given key data (the key respectively) was revoked, non-zero otherwise +# isGpgKeyInKeyDataRevoked "$keyData" +# +# # returns the revocation data one can retrieve via --list-sigs --with-colons (rev) for the given key +# getRevocationData 4B78012139378220 +# +# # returns the revocation data one can retrieve via --list-sigs --with-colons (rev) for the given key +# # but searches the revocation not in the default gpg store but in .gt/remotes/tegonal-scripts/public-keys/gpg +# getRevocationData 4B78012139378220 .gt/remotes/tegonal-scripts/public-keys/gpg +# +# # extract the creation timestamp from the given revocation data +# extractCreationTimestampFromRevocationData +# +# # list all signatures of the given key and highlights it in the output (which especially useful if the key is a subkey +# # and there are other subkeys) +# listSignaturesAndHighlightKey 4B78012139378220 +# +# # list all signatures of the given key and highlights it in the output (which especially useful if the key is a subkey +# # and there are other subkeys) but searches the revocation not in the default gpg store but in +# # .gt/remotes/tegonal-scripts/public-keys/gpg +# listSignaturesAndHighlightKey 4B78012139378220 .gt/remotes/tegonal-scripts/public-keys/gpg +# ################################### set -euo pipefail shopt -s inherit_errexit @@ -55,26 +97,26 @@ function trustGpgKey() { } function importGpgKey() { - local gpgDir file withConfirmation + local gpgDir file confirmationQuestion # shellcheck disable=SC2034 # is passed by name to parseFnArgs - local -ra params=(gpgDir file withConfirmation) + local -ra params=(gpgDir file confirmationQuestion) parseFnArgs params "$@" local outputKey outputKey=$( gpg --homedir "$gpgDir" --no-tty --keyid-format LONG \ - --list-options show-user-notations,show-std-notations,show-usage,show-sig-expire \ + --list-options show-sig-expire,show-unusable-subkeys,show-unusable-uids,show-usage,show-user-notations \ --import-options show-only \ --import "$file" ) || die "not able to show the theoretical import of %s, aborting" "$file" - local isTrusting='y' - if [[ $withConfirmation != "--confirm=false" ]]; then + local isTrusting=y + if [[ -n $confirmationQuestion ]]; then echo "===========================================================================" echo "$outputKey" - if askYesOrNo "The above key(s) will be used to verify the files you will pull from this remote, do you trust them?"; then - isTrusting='y' + if askYesOrNo "%s" "$confirmationQuestion"; then + isTrusting=y else - isTrusting='n' + isTrusting=n fi echo "" echo "Decision: $isTrusting" @@ -93,3 +135,123 @@ function importGpgKey() { return 1 fi } + +function getSigningGpgKeyData() { + if (($# == 0)) || (($# > 2)); then + logError "You need to pass at least 1 and at max 2 arguments to getSigningGpgKeyData, given \033[0;36m%s\033[0m\n" "$#" + echo >&2 '1: sigFile the signature file' + echo >&2 "2: gpgDir (optional) the gpg-dir in which we shall search for the key -- default: use gpg's default" + printStackTrace + exit 9 + fi + local sigFile=$1 + local gpgDir=${2:-''} + + local sigPackets keyId + sigPackets=$(gpg --list-packets "$sigFile") || returnDying "could not list-packets for %s" "$sigFile" || return $? + keyId=$(grep -oE "keyid .*" <<<"$sigPackets" | cut -c7-) || returnDying "could not extract keyid from signature packets:\n%s" "$sigPackets" || return $? + + gpg --homedir "$gpgDir" --list-keys \ + --list-options show-sig-expire,show-unusable-subkeys,show-unusable-uids \ + --with-colons "$keyId" | grep -E "^(pub|sub).*$keyId" || returnDying "was not able to extract the key data for %s" "$keyId" || return $? +} + +function getSigCreationDate() { + local sigFile + # shellcheck disable=SC2034 # is passed by name to parseFnArgs + local -ra params=(sigFile) + parseFnArgs params "$@" + shift 1 || traceAndDie "could not shift by 1" + + local sigPackets keyId + sigPackets=$(gpg --list-packets "$sigFile") || returnDying "could not list-packets for %s" "$sigFile" || return $? + grep -oE "sig created [0-9-]+" <<<"$sigPackets" | cut -c13- || returnDying "was not able to extract the signature creation timestamp out of the signature packets:\n%s" "$sigPackets" || return $? +} + +function extractGpgKeyIdFromKeyData() { + local keyData + # shellcheck disable=SC2034 # is passed by name to parseFnArgs + local -ra params=(keyData) + parseFnArgs params "$@" + cut -d ':' -f5 <<<"$keyData" +} + +function extractExpirationTimestampFromKeyData() { + local keyData + # shellcheck disable=SC2034 # is passed by name to parseFnArgs + local -ra params=(keyData) + parseFnArgs params "$@" + cut -d ':' -f7 <<<"$keyData" +} + +function isGpgKeyInKeyDataExpired() { + local keyData + # shellcheck disable=SC2034 # is passed by name to parseFnArgs + local -ra params=(keyData) + parseFnArgs params "$@" + + grep -E '^(sub|pub):e:' <<<"$keyData" >/dev/null +} + +function isGpgKeyInKeyDataRevoked() { + local keyData + # shellcheck disable=SC2034 # is passed by name to parseFnArgs + local -ra params=(keyData) + parseFnArgs params "$@" + + grep -E '^(sub|pub):r:' <<<"$keyData" >/dev/null +} + +function getRevocationData() { + if (($# == 0)) || (($# > 2)); then + logError "You need to pass at least 1 and at max 2 arguments to getRevocationData, given \033[0;36m%s\033[0m\n" "$#" + echo >&2 '1: keyId the gpg keyId for which we shall print the revocation informatoin' + echo >&2 "2: gpgDir (optional) the gpg-dir in which we shall search for the key -- default: use gpg's default" + printStackTrace + exit 9 + fi + local keyId=$1 + local gpgDir=${2:-''} + shift 1 || traceAndDie "could not shift by 1" + + local sigs revData + sigs=$(gpg --homedir "$gpgDir" --list-sigs \ + --list-options show-sig-expire,show-unusable-subkeys,show-unusable-uids \ + --with-colons "$keyId") || returnDying "could not list signatures for key %s" "$keyId" || return $? + revData=$(perl -0777 -ne 'while (/(sub|pub):r:.*?:'"$keyId"':[\S\s]+?(rev:.*)/g) { print "$2\n"; }' <<<"$sigs") + [[ -n $revData ]] || returnDying "was not able to extract the revocation data from the signatures (maybe it was not revoked?):\n%" "$sigs" || return $? + echo "$revData" +} + +function extractCreationTimestampFromRevocationData() { + local revocationData + # shellcheck disable=SC2034 # is passed by name to parseFnArgs + local -ra params=(revocationData) + parseFnArgs params "$@" + cut -d ':' -f6 <<<"$revocationData" +} + +function listSignaturesAndHighlightKey() { + if (($# == 0)) || (($# > 2)); then + logError "You need to pass at least 1 and at max 2 arguments to listSignaturesAndHighlightKey, given \033[0;36m%s\033[0m\n" "$#" + echo >&2 '1: keyId the gpg keyId for which we shall display signatures' + echo >&2 "2: gpgDir (optional) the gpg-dir in which we shall search for the key -- default: use gpg's default" + printStackTrace + exit 9 + fi + local keyId=$1 + local gpgDir=${2:-''} + shift 1 || traceAndDie "could not shift by 1" + + local signatures + signatures=$( + gpg --homedir "$gpgDir" --list-sigs \ + --keyid-format LONG \ + --list-options show-sig-expire,show-unusable-subkeys,show-unusable-uids,show-usage,show-user-notations "$keyId" + ) || returnDying "could not list signatures for key %s" "$keyId" || return $? + + # using variable substitution in combination with ANSI colours does not seem to work properly + # hence we use sed and ignore SC2001 + # shellcheck disable=SC2001 + sed "s/$keyId/\x1b[0;31m&\x1b[0m/g" <<<"$signatures" +} diff --git a/lib/tegonal-scripts/src/utility/http.sh b/lib/tegonal-scripts/src/utility/http.sh index 21d2211..374cf02 100644 --- a/lib/tegonal-scripts/src/utility/http.sh +++ b/lib/tegonal-scripts/src/utility/http.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # utility function dealing with fetching files via http @@ -29,7 +29,7 @@ set -euo pipefail shopt -s inherit_errexit unset CDPATH -export TEGONAL_SCRIPTS_VERSION='v3.5.0' +export TEGONAL_SCRIPTS_VERSION='v4.1.0' if ! [[ -v dir_of_tegonal_scripts ]]; then dir_of_tegonal_scripts="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)/.." diff --git a/lib/tegonal-scripts/src/utility/io.sh b/lib/tegonal-scripts/src/utility/io.sh index 612c887..d05f552 100644 --- a/lib/tegonal-scripts/src/utility/io.sh +++ b/lib/tegonal-scripts/src/utility/io.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # utility function dealing with Input/Ouput diff --git a/lib/tegonal-scripts/src/utility/log.sh b/lib/tegonal-scripts/src/utility/log.sh index e70124d..fc95842 100644 --- a/lib/tegonal-scripts/src/utility/log.sh +++ b/lib/tegonal-scripts/src/utility/log.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Utility functions wrapping printf and prefixing the message with a coloured INFO, WARNING or ERROR. diff --git a/lib/tegonal-scripts/src/utility/parse-args.sh b/lib/tegonal-scripts/src/utility/parse-args.sh index 0cbf6f4..cbda5df 100644 --- a/lib/tegonal-scripts/src/utility/parse-args.sh +++ b/lib/tegonal-scripts/src/utility/parse-args.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Intended to parse command line arguments. Provides a simple way to parse named arguments including a documentation @@ -147,7 +147,7 @@ function parseArgumentsInternal { while (($# > 0)); do parseArguments_argName="$1" if [[ $parseArguments_argName == --help ]]; then - parse_args_printHelp parseArguments_paramArr "$parseArguments_examples" "$parseArguments_version" + parse_args_printHelp parseArguments_paramArr "$parseArguments_examples" "$parseArguments_version" 4 if ! ((parseArguments_numOfArgumentsParsed == 0)); then logWarning "there were arguments defined prior to --help, they were all ignored and instead the help is shown" elif (($# > 1)); then @@ -171,10 +171,10 @@ function parseArgumentsInternal { local parseArguments_regex="^($parseArguments_pattern)$" if [[ $parseArguments_argName =~ $parseArguments_regex ]]; then if (($# < 2)); then - logError "no value defined for parameter \033[1;36m%s\033[0m (pattern %s) in %s" "$parseArguments_paramName" "$parseArguments_pattern" "${BASH_SOURCE[1]}" + logError "no value defined for parameter \033[1;36m%s\033[0m (pattern %s) in %s" "$parseArguments_paramName" "$parseArguments_pattern" "${BASH_SOURCE[2]}" echo >&2 "following the help documentation:" echo >&2 "" - parse_args_printHelp >&2 parseArguments_paramArr "$parseArguments_examples" "$parseArguments_version" + parse_args_printHelp >&2 parseArguments_paramArr "$parseArguments_examples" "$parseArguments_version" 4 printStackTrace exit 9 fi @@ -193,7 +193,7 @@ function parseArgumentsInternal { logError "unknown argument \033[1;36m%s\033[0m" "$parseArguments_argName" fi if askYesOrNo "Shall I print the help for you?"; then - parse_args_printHelp >&2 parseArguments_paramArr "$parseArguments_examples" "$parseArguments_version" + parse_args_printHelp >&2 parseArguments_paramArr "$parseArguments_examples" "$parseArguments_version" 4 fi exit 9 fi @@ -202,17 +202,20 @@ function parseArgumentsInternal { } function parse_args_printHelp { - if ! (($# == 3)); then + if ! (($# == 4)); then logError "Three arguments need to be passed to parse_args_printHelp, given \033[0;36m%s\033[0m\nFollowing a description of the parameters:" "$#" - echo >&2 '1: params the name of an array which contains the parameter definitions' - echo >&2 '2: examples a string containing examples (or an empty string)' - echo >&2 '3: version the version which shall be shown if one uses --version' + echo >&2 '1: params the name of an array which contains the parameter definitions' + echo >&2 '2: examples a string containing examples (or an empty string)' + echo >&2 '3: version the version which shall be shown if one uses --version' + echo >&2 '4: stackFrame number of frames to drop to determine the source of the call' printStackTrace exit 9 fi local -rn parse_args_printHelp_paramArr=$1 local -r examples=$2 local -r version=$3 + local -r stackFrame=$4 + shift 4 || traceAndDie "could not shift by 4" parse_args_exitIfParameterDefinitionIsNotTriple parse_args_printHelp_paramArr @@ -244,7 +247,7 @@ function parse_args_printHelp { echo "$examples" fi echo "" - printVersion "$version" 4 + printVersion "$version" "$stackFrame" } function exitIfNotAllArgumentsSet { @@ -287,7 +290,7 @@ function exitIfNotAllArgumentsSet { echo >&2 "" echo >&2 "following the help documentation:" echo >&2 "" - parse_args_printHelp >&2 exitIfNotAllArgumentsSet_paramArr "$exitIfNotAllArgumentsSet_examples" "$exitIfNotAllArgumentsSet_version" + parse_args_printHelp >&2 exitIfNotAllArgumentsSet_paramArr "$exitIfNotAllArgumentsSet_examples" "$exitIfNotAllArgumentsSet_version" 5 if ((${#FUNCNAME[@]} > printStackTraceIfMoreThan)); then printStackTrace fi diff --git a/lib/tegonal-scripts/src/utility/parse-commands.sh b/lib/tegonal-scripts/src/utility/parse-commands.sh index 1f2fffb..99ae297 100644 --- a/lib/tegonal-scripts/src/utility/parse-commands.sh +++ b/lib/tegonal-scripts/src/utility/parse-commands.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Intended to parse command line arguments of a script which uses commands and delegates accordingly. diff --git a/lib/tegonal-scripts/src/utility/parse-fn-args.sh b/lib/tegonal-scripts/src/utility/parse-fn-args.sh index 8e8a920..1fe17ca 100644 --- a/lib/tegonal-scripts/src/utility/parse-fn-args.sh +++ b/lib/tegonal-scripts/src/utility/parse-fn-args.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Intended to parse positional function parameters including assignment and check if there are enough arguments diff --git a/lib/tegonal-scripts/src/utility/parse-utils.sh b/lib/tegonal-scripts/src/utility/parse-utils.sh index a04b699..551382d 100644 --- a/lib/tegonal-scripts/src/utility/parse-utils.sh +++ b/lib/tegonal-scripts/src/utility/parse-utils.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Intended to parse command line arguments. Provides a simple way to parse named arguments including a documentation @@ -65,7 +65,7 @@ function printVersion() { if ! (($# == 1)) && ! (($# == 2)); then logError "One argument needs to be passed to printVersion, given \033[0;36m%s\033[0m\nFollowing a description of the parameters:" "$#" echo >&2 '1: version the version which shall be shown if one uses --version' - echo >&2 '1: stackFrame numberthe version which shall be shown if one uses --version' + echo >&2 '2: stackFrame number of frames to drop to determine the source of the call' printStackTrace exit 9 fi diff --git a/lib/tegonal-scripts/src/utility/recursive-declare-p.sh b/lib/tegonal-scripts/src/utility/recursive-declare-p.sh index 714bf64..60fa426 100644 --- a/lib/tegonal-scripts/src/utility/recursive-declare-p.sh +++ b/lib/tegonal-scripts/src/utility/recursive-declare-p.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Utility function which returns the `declare` statement of a variable with given name where it recursively calls diff --git a/lib/tegonal-scripts/src/utility/replace-help-snippet.sh b/lib/tegonal-scripts/src/utility/replace-help-snippet.sh index ab06c21..c563272 100644 --- a/lib/tegonal-scripts/src/utility/replace-help-snippet.sh +++ b/lib/tegonal-scripts/src/utility/replace-help-snippet.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Helper script do capture the `--help` output of a script and replace a snippet in HTML based scripts (e.g. in a Markdown script). diff --git a/lib/tegonal-scripts/src/utility/replace-snippet.sh b/lib/tegonal-scripts/src/utility/replace-snippet.sh index dbe3603..9675f42 100644 --- a/lib/tegonal-scripts/src/utility/replace-snippet.sh +++ b/lib/tegonal-scripts/src/utility/replace-snippet.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Helper script do replace a snippet in HTML based files (e.g. in a Markdown file). diff --git a/lib/tegonal-scripts/src/utility/source-once.sh b/lib/tegonal-scripts/src/utility/source-once.sh index fd10b70..b0e59c7 100644 --- a/lib/tegonal-scripts/src/utility/source-once.sh +++ b/lib/tegonal-scripts/src/utility/source-once.sh @@ -7,7 +7,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 ####### Description ############# # # Utility functions wrapping printf and prefixing the message with a coloured INFO, WARNING or ERROR. diff --git a/lib/tegonal-scripts/src/utility/update-bash-docu.sh b/lib/tegonal-scripts/src/utility/update-bash-docu.sh index 6c6474b..f3ee650 100644 --- a/lib/tegonal-scripts/src/utility/update-bash-docu.sh +++ b/lib/tegonal-scripts/src/utility/update-bash-docu.sh @@ -6,7 +6,7 @@ # \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Apache License 2.0 # /___/ Please report bugs and contribute back your improvements # -# Version: v3.5.0 +# Version: v4.1.0 # ####### Description ############# #