Skip to content

Commit 8b82e97

Browse files
authored
Merge pull request #13 from DiamondLightSource/man-pages
Install man in the background
2 parents 9928079 + f541b8a commit 8b82e97

4 files changed

Lines changed: 12 additions & 2 deletions

File tree

.devcontainer/features/bash-config/config/bash-config-rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#!/bin/bash
22

33
# default opinioned bash configuration
4+
# DO NOT MODIFY if installed in /bash-config
5+
# this file will be overwritten on each container launch
46

57
# enable enternal shared history
68
export HISTCONTROL=ignoreboth:erasedups
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# this script is run once inside the developer container after creation time
4+
5+
# Install man so we can do git <command> --help
6+
apt-get update && apt-get install -y --no-install-recommends man

.devcontainer/features/bash-config/devcontainer-feature.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"documentationURL": "https://raw.githubusercontent.com/DiamondLightSource/devcontainer-features/refs/heads/main/.devcontainer/features/bash-config/README.md",
99
"containerEnv": {
1010
"CONFIG_FOLDER": "/bash-config",
11-
"CONFIG_STAGING": "/bash-config-staging"
11+
"CONFIG_STAGING": "/tmp/bash-config"
1212
},
1313
"mounts": [
1414
{
@@ -17,5 +17,6 @@
1717
"type": "bind"
1818
}
1919
],
20-
"onCreateCommand": "bash /bash-config-staging/onCreateCommand.sh"
20+
"onCreateCommand": "bash /tmp/bash-config/onCreateCommand.sh",
21+
"postCreateCommand": "bash /tmp/bash-config/postCreateCommand.sh"
2122
}

test/bash-config/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ source dev-container-features-test-lib
1212
# check <LABEL> <cmd> [args...]
1313
check "eternal history" bash -c "test $HISTFILE == $CONFIG_FOLDER/.bash_eternal_history"
1414
check "execute command" bash -c "test $HISTFILE == $CONFIG_FOLDER/.bash_eternal_history"
15+
check "man installed" man -V
1516
check "ls colors" bash -c "test $LS_OPTIONS == --color=auto"
1617

1718
# Report results

0 commit comments

Comments
 (0)