Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorials:keepassgit [2011/05/18 12:12] clemenstutorials:keepassgit [2011/05/18 12:14] clemens
Line 41: Line 41:
 </code> </code>
  
 +==== Usage ====
 +
 +  * Linux/Unix
 +    * cd ~/keepass
 +    * ./keepass.sh
 +  * Windows
 +    * Right-Click on the folder that contains the script and database
 +    * Click "Git BASH here"
 +    * ./keepass.sh
 +
 +When you start the script, it will try to get the latest version of your keepass db. If there was no successful connection to the server, it will open a read-only version of keepass for you. If the Git pull was successful, the script generates a lock file globally and opens keepass. This prevents that you have opened keepass in write-mode on two or more locations simultanously. When you close keepass, all changes will be commited and pushed to your git server again.
  
 ==== The Script ==== ==== The Script ====
Line 46: Line 57:
 <code bash> <code bash>
 #!/bin/bash #!/bin/bash
 +
 git pull origin master git pull origin master
 +
 if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
         echo "===================================="         echo "===================================="
Line 77: Line 90:
  
  
-==== Usage ==== 
  
-  * Linux/Unix 
-    * cd ~/keepass 
-    * ./keepass.sh 
-  * Windows 
-    * Right-Click on the folder that contains the script and database 
-    * Click "Git BASH here" 
-    * ./keepass.sh 
- 
-When you start the script, it will try to get the latest version of your keepass db. If there was no successful connection to the server, it will open a read-only version of keepass for you. If the Git pull was successful, the script generates a lock file globally and opens keepass. This prevents that you have opened keepass in write-mode on two or more locations simultanously. When you close keepass, all changes will be commited and pushed to your git server again.