forked from devcontainers/features
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_git_from_src.sh
More file actions
29 lines (20 loc) · 893 Bytes
/
Copy pathinstall_git_from_src.sh
File metadata and controls
29 lines (20 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
set -e
# Optional: Import test library
source dev-container-features-test-lib
# Import shared helper functions
source "$(dirname "$0")/utils.sh"
# Definition specific tests
check "version" git --version
check "version-is-latest" check_git_is_latest_version
check "gettext" dpkg-query -l gettext
cd /tmp && git clone https://github.com/devcontainers/feature-starter.git
cd feature-starter
check "perl" bash -c "git -c grep.patternType=perl grep -q 'a.+b'"
check "git-location" bash -c "which git | grep /usr/local/bin/git"
check "set-git-config-user-name" bash -c "git config --system user.name devcontainers"
check "gitconfig-file-location" bash -c "ls /etc/gitconfig"
check "gitconfig-contains-name" bash -c "cat /etc/gitconfig | grep 'name = devcontainers'"
check "usr-local-etc-config-does-not-exist" test ! -f "/usr/local/etc/gitconfig"
# Report result
reportResults