gitbash_solarized icon indicating copy to clipboard operation
gitbash_solarized copied to clipboard

Running setup.sh twice will wipe out the original config files

Open chipilov opened this issue 6 years ago • 1 comments

If you run setup.sh twice for any reason, the original config files will essentially be wiped out.

In my case, when I ran setup.sh the first time, I got this (still note sure why): ./setup.sh: 12: /mnt/c/Users/stefan.c/linux/.bashrc: function: not found ./setup.sh: 14: /mnt/c/Users/stefan.c/linux/.bashrc: Syntax error: "}" unexpected

Later, I tried to run setup.sh again to see if the original error will still show up (after I tried a few changes) and. This second run wiped out my original config files (i.e. both .bashrc and bashrc_bkp were identical copies of .bashrc from this repo).

Maybe the setup.sh can create unique backups on each run (e.g. with a timestamp attached to the filename).

chipilov avatar Dec 24 '18 00:12 chipilov

Yeah, it was admittedly a pretty crude way of safeguarding. The timestamp idea you suggested sounds good. I'll look into that and update soon.

speedpacer avatar Dec 24 '18 23:12 speedpacer