aboutsummaryrefslogblamecommitdiffstatshomepage
path: root/.README.md
blob: 33a792b317fa6d6824f933c1f332be829fbf0f0f (plain) (tree)
1
2
3
4
5

                          
 
                                         
 












                                                                            

          
 

                                                                  
                                                                             


                                                                             

            


                                                                                                                       
                                                                    

                                                     

                                                                           
 


                
                                        

                                                                         
                                                                       
                                                       
 
                                   

                                                                             
                                          


                                                                             

                                                                            







                                  
Cygwin configuration files
==========================

My Cygwin home (`~`) configuration files.

Prerequisites
-------------

Some of the functionality relies on the availability of native symlinks.
Those are indeed available on NTFS, but require Administrator privileges for
creation.
It likely won't bother you as long as you don't use the functions from
".bashrc" that actually create symbolic links (you will likely see `ln`
complaining about some access being denied in case you do).

Your `CYGWIN` environment variable (on Windows) **must** include either
`winsymlinks:native` or `winsymlinks:nativestrict`!

Deployment
----------

To deploy on a fresh Cygwin installation, execute the lines below.
**Be careful** though, some of your files might get **deleted**.
Namely, your ".gitignore" file (if present) will be overwritten and basically
all of your files this repository isn't aware of will be deleted.
Execute the lines below one-by-one and, **most importantly**, review the list
of files `git clean` will delete by adding the `--dry-run` parameter.

    git init
    curl --silent --show-error --location https://github.com/egor-tensin/cygwin_home/raw/master/.gitignore > .gitignore
    git clean -d --force

    git remote add origin git@github.com:egor-tensin/cygwin-home.git
    git pull origin master
    git branch --set-upstream-to=origin/master master

The deployment should preferably take place right after you install Cygwin.

File permissions
----------------

`git` doesn't preserve file permissions.
After the deployment, anyone will be able to read any of the files in the
repository.
To adjust the permissions so that only you can read the files, `source`
".bashrc" (`bash` does this automatically) and execute:

    ( cd && tighten_repo_security )

This also makes sure the directories in the repository are accessible only by
yourself (including the ".git" directory).

The important thing to note is that the permissions are reset each time `git`
writes to a file.
It is thus necessary to execute the line above after each invokation of `git
pull`, `git checkout`, etc.

License
-------

Distributed under the MIT License.
See [.LICENSE.txt] for details.

[.LICENSE.txt]: .LICENSE.txt