forked from iay/shibboleth-build-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcopy-dotfiles
executable file
·56 lines (50 loc) · 1.03 KB
/
copy-dotfiles
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
#
# Copy some relevant "dotfiles" from the outer environment into the inner one.
#
#
# Maven configuration.
#
# The Maven repository is NOT copied, so the repository inside the
# container is independent to the one outside.
#
mkdir -p user/.m2
if [ -e ~/.m2/settings.xml ]; then
cp -f ~/.m2/settings.xml user/.m2/
fi
#
# Git configuration.
#
if [ -e ~/.gitconfig ]; then
cp -f ~/.gitconfig user/
fi
#
# SSH configuration.
#
if [ -d ~/.ssh ]; then
cp -f -r ~/.ssh user/
fi
#
# GPG configuration.
#
# Only copy general configuration and old-style keyrings.
#
# Don't copy anything else: things like agent sockets and agent configuration
# need to be different inside the container.
#
if [ -d ~/.gnupg ]; then
mkdir -p user/.gnupg
chmod 700 user/.gnupg
if [ -f ~/.gnupg/gpg.conf ]; then
cp -f ~/.gnupg/gpg.conf user/.gnupg/
fi
if [ -f ~/.gnupg/secring.gpg ]; then
cp -f ~/.gnupg/secring.gpg user/.gnupg/
fi
if [ -f ~/.gnupg/pubring.gpg ]; then
cp -f ~/.gnupg/pubring.gpg user/.gnupg/
fi
fi
#
# End.
#