mirror of
https://github.com/Snigdha-OS/snigdhaos-system-config.git
synced 2025-09-20 11:34:58 +02:00
@eshanized: push via push.sh 🎉 !!!
This commit is contained in:
35
usr/local/bin/skel
Normal file
35
usr/local/bin/skel
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Copy contents from /etc/skel to Home directory? (Y/n)"
|
||||
read -r response
|
||||
|
||||
if [[ "$response" == [yY] ]]; then
|
||||
|
||||
time=$(date +%Y.%m.%d-%H.%M.%S)
|
||||
if [ ! -d ~/.config ]; then
|
||||
mkdir ~/.config
|
||||
fi
|
||||
echo
|
||||
# shellcheck disable=SC2086
|
||||
echo "Backing up .config folder to ~/.config-backup-"$time
|
||||
echo
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
cp -Rf ~/.config ~/.config-backup-$time
|
||||
|
||||
echo
|
||||
echo "Overwriting existing .config folder with the files from /etc/skel"
|
||||
echo
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
cp -r /etc/skel/. $HOME
|
||||
|
||||
echo
|
||||
echo "Task Completed!"
|
||||
echo
|
||||
|
||||
else
|
||||
echo
|
||||
echo "No change!"
|
||||
echo
|
||||
fi
|
Reference in New Issue
Block a user