Skip to content

Commit

Permalink
Added functionality to copy dotfiles to user home dir
Browse files Browse the repository at this point in the history
  • Loading branch information
rebornplusplus committed Sep 10, 2022
1 parent dafc2ba commit fd41a64
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions scripts/copy_dots.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
source vars.sh

cd $DOTS_DIR

for user in $(echo "$ADMIN_USER $TEAM_USER"); do
homedir="/home/$user"
for file in .[^.]*; do
cp -rv $file "$homedir/"
chown -R -c -v $user:$user "$homedir/$file"
chmod -R -v 750 "$homedir/$file"
done
done

cd -
2 changes: 2 additions & 0 deletions scripts/vars.sh → vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ ADMIN_PASSWORD='$1$qOaJpMTn$udSLvrlWWiT43He1M2wy5.'
TEAM_USER="contestant"
TEAM_PASSWORD='$1$92hYmWFk$qPeMP85ThFuzlKbdgh3cu0'
# encrypted with $(openssl passwd -1 PLAINTEXTPASSWORD)

DOTS_DIR="dots"

0 comments on commit fd41a64

Please sign in to comment.