Skip to content

Commit fd41a64

Browse files
Added functionality to copy dotfiles to user home dir
1 parent dafc2ba commit fd41a64

File tree

7 files changed

+16
-0
lines changed

7 files changed

+16
-0
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

scripts/copy_dots.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
source vars.sh
2+
3+
cd $DOTS_DIR
4+
5+
for user in $(echo "$ADMIN_USER $TEAM_USER"); do
6+
homedir="/home/$user"
7+
for file in .[^.]*; do
8+
cp -rv $file "$homedir/"
9+
chown -R -c -v $user:$user "$homedir/$file"
10+
chmod -R -v 750 "$homedir/$file"
11+
done
12+
done
13+
14+
cd -

scripts/vars.sh renamed to vars.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ ADMIN_PASSWORD='$1$qOaJpMTn$udSLvrlWWiT43He1M2wy5.'
55
TEAM_USER="contestant"
66
TEAM_PASSWORD='$1$92hYmWFk$qPeMP85ThFuzlKbdgh3cu0'
77
# encrypted with $(openssl passwd -1 PLAINTEXTPASSWORD)
8+
9+
DOTS_DIR="dots"

0 commit comments

Comments
 (0)