summaryrefslogtreecommitdiff
path: root/src/content/tils/2020/11
diff options
context:
space:
mode:
Diffstat (limited to 'src/content/tils/2020/11')
-rw-r--r--src/content/tils/2020/11/08/find-broken-symlink.adoc4
-rw-r--r--src/content/tils/2020/11/12/diy-nix-bash-ci.adoc2
-rw-r--r--src/content/tils/2020/11/12/git-bisect-automation.adoc5
-rw-r--r--src/content/tils/2020/11/12/useful-bashvars.adoc6
-rw-r--r--src/content/tils/2020/11/30/git-notes-ci.adoc4
5 files changed, 11 insertions, 10 deletions
diff --git a/src/content/tils/2020/11/08/find-broken-symlink.adoc b/src/content/tils/2020/11/08/find-broken-symlink.adoc
index 9b44036..624d24a 100644
--- a/src/content/tils/2020/11/08/find-broken-symlink.adoc
+++ b/src/content/tils/2020/11/08/find-broken-symlink.adoc
@@ -6,7 +6,7 @@
The `find` command knows how to show broken symlinks:
-[source,shell]
+[source,sh]
----
find . -xtype l
----
@@ -15,7 +15,7 @@ This was useful to me when combined with {annex}[Git Annex]. Its
{annex-wanted}[`wanted`] option allows you to have a "sparse" checkout of the
content, and save space by not having to copy every annexed file locally:
-[source,shell]
+[source,sh]
----
git annex wanted . 'exclude=Music/* and exclude=Videos/*'
----
diff --git a/src/content/tils/2020/11/12/diy-nix-bash-ci.adoc b/src/content/tils/2020/11/12/diy-nix-bash-ci.adoc
index 219b694..97ace30 100644
--- a/src/content/tils/2020/11/12/diy-nix-bash-ci.adoc
+++ b/src/content/tils/2020/11/12/diy-nix-bash-ci.adoc
@@ -12,7 +12,7 @@ to the server.
In most of my project I like to keep a `test` attribute which runs the test with
`nix-build -A test`. This way, a post-receive hook could look like:
-[source,shell]
+[source,sh]
----
#!/usr/bin/env bash
set -Eeuo pipefail
diff --git a/src/content/tils/2020/11/12/git-bisect-automation.adoc b/src/content/tils/2020/11/12/git-bisect-automation.adoc
index d7ea2ca..dff8737 100644
--- a/src/content/tils/2020/11/12/git-bisect-automation.adoc
+++ b/src/content/tils/2020/11/12/git-bisect-automation.adoc
@@ -10,11 +10,12 @@ I've already been in the situation when a bug was introduced and I didn't know
how it even was occurring, and running Git bisect over hundreds of commits to
pinpoint the failing commit was very empowering:
-....
+[source,sh]
+----
$ GOOD_COMMIT_SHA=e1fd0a817d192c5a5df72dd7422e36558fa78e46
$ git bisect start HEAD $GOOD_COMMIT_SHA
$ git bisect run sn -c './build.sh && ./run-failing-case.sh'
-....
+----
Git will than do a binary search between the commits, and run the commands you
provide it with to find the failing commit.
diff --git a/src/content/tils/2020/11/12/useful-bashvars.adoc b/src/content/tils/2020/11/12/useful-bashvars.adoc
index 84b93c3..fb148fb 100644
--- a/src/content/tils/2020/11/12/useful-bashvars.adoc
+++ b/src/content/tils/2020/11/12/useful-bashvars.adoc
@@ -13,7 +13,7 @@ on the terminal.
The {bash-bang-bang}[`!!` variable] refers to the previous command, and I find
useful when following chains for symlinks:
-[source,shell]
+[source,sh]
----
$ which git
/run/current-system/sw/bin/git
@@ -25,7 +25,7 @@ readlink $(which git)
It is also useful when you forget to prefix `sudo` to a command that requires
it:
-[source,shell]
+[source,sh]
----
$ requires-sudo.sh
requires-sudo.sh: Permission denied
@@ -43,7 +43,7 @@ The {bash-dollar-underscore}[`$_` variable] will give you the most recent
parameter you provided to a previous argument, which can save you typing
sometimes:
-[source,shell]
+[source,sh]
----
# instead of...
$ mkdir -p a/b/c/d/
diff --git a/src/content/tils/2020/11/30/git-notes-ci.adoc b/src/content/tils/2020/11/30/git-notes-ci.adoc
index 602e11d..48a996b 100644
--- a/src/content/tils/2020/11/30/git-notes-ci.adoc
+++ b/src/content/tils/2020/11/30/git-notes-ci.adoc
@@ -13,7 +13,7 @@ I've written a small script that will put log files and CI job data on Git
notes, and make it visible on the porcelain log. It is a simple extension of
the previous article:
-[source,shell]
+[source,sh]
----
#!/usr/bin/env bash
set -Eeuo pipefail
@@ -101,7 +101,7 @@ https://euandre.org/git/servers/commit?id=87c57133abd8be5d7cc46afbf107f59b260665
You can go even further: since cgit can serve raw blob directly, you can even
serve such artifacts (log files, release artifacts, binaries) from cgit itself:
-[source,shell]
+[source,sh]
----
$ SHA="$(git notes --ref=refs/notes/ci-logs list 87c57133abd8be5d7cc46afbf107f59b26066575)"
$ echo "https://euandre.org/git/servers/blob?id=$SHA"