Easily Manage Dot Files (Config Files)

#
#!/bin/bash
declare -a filesToSync=(".bashrc" ".bash_history" ".zshrc" ".zsh_history" ".gitignore_global" ".gitconfig")
## now loop through the above array
for i in "${filesToSync[@]}"
do
cp ~/$i ~/dotfiles/$i
# or do whatever with individual element of the array
done
declare -a foldersToSync=(".config/Terminator",".config/JetBrains") ## now loop through the above array
for i in "${foldersToSync[@]}"
do
cp -r ~/$i ~/dotfiles
## or do whatever with individual element of the array
done
##!/bin/bashcd ~/dotfilesbash syncfile.shgit add .git commit -m “weekly changes”git push -u origin master -f 
0 0 * * 0 bash /home/ujwal/dotfiles/cronscript.sh

Conclusion

--

--

--

Software Development Enthusiast

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Git Tags .FTW

Quickly get started with Serverless Framework (SLS) for AWS Lambda Function Layers and debug them…

MyHeritage Releases to Production

Designer’s Schedule, Manager’s Schedule

The Long Wait: Can Microsoft Finally Unify Desktop and Mobile Apps?

peer-to-peer cluster membership using the SWIM gossip protocol and CRDTs

Better performances, high security, deprecated functions: here’s all the news about PHP 7.2

NiFi NAR Files Explained

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ujwal dhakal

ujwal dhakal

Software Development Enthusiast

More from Medium

A complete Traefik configuration 🚥

How To Run Docker in Docker

Understanding Kubernetes deployments with Helm

Creating, Building, and Invoking a Function on OCI with Terraform