Giter Club home page Giter Club logo

dotfiles's Introduction

dotfiles

dotsync.sh

Create symlinks to your dotfiles with the following steps:

  1. Update your current local dotfiles repo with the latest remote changes.

  2. Scan this repo and subfolders for every file and folder starting with a dot. Only the root and the first level of subfolder are scanned.

  3. Propose to the user the following list of changes:

  • Create symlinks from your home directory to the files from step 2.
  • Backup any file in your home repository that may be overwritten by the symlink creation.
  • Remove old symlinks from your home directory to missing file of this repo.

This preview include the name of every files involved and the action that will be taken.

It will also report: - Rejected file from potential conflict when two files have the same name from different directory. - Ignored file when a file name is listed in the .dotignore file - Skipped file when a file is already symlinked to this repo.

  1. If user confirm to proceed with the changes proposal:
  • apply them all at once.
  • create a symlink to the dotrevert.sh script

dotrevert.sh

Undo the dotsync.sh changes:

  1. Scan the user home directory for any symlinks pointing to a file of this repo.
  2. Scan the backup folder.
  3. Propose to the user the following list of changes:
    • Remove all files from step 1 in the home directory.
    • Restore all files from step 2 in the home directory.
  4. If user confirm to proceed with the changes proposal, apply them all at once.

options

sh dotsync.sh [-f] [-t filename] 
sh dotrevert.sh [-f] [-t filename] 

-f: don't ask for user confirmation before applying changes.
-t: only apply to the specified filename.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.