Skip to content

Commit 9a23d23

Browse files
committed
Adding bootstrap script
1 parent c286ef8 commit 9a23d23

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Sorting script is ran every time you commit changes of .pbxproj file.
1919
How to use it?
2020
---
2121
1. First off you need to clone **pysock** directory and **sock-sort.sh** script into root of your project.
22-
2. Next you need to create git hook: `ln -s ../../sock-sort.sh .git/hooks/pre-commit`
22+
2. Next you need to create git hook: `./bootstrap.sh`
2323
3. Add permissions `chmod 555 .git/hooks/pre-commit`
2424
4. In your master branch sort .pbxproj file for the first time by changing something in .pbxproj and commiting **or** manually running sorting script: `python pysock/sock.py AwesomeProject.xcodeproj/project.pbxproj` and then commiting changes.
2525
5. And your done! Every next branch will have sorted .pbxproj file and every time you merge you'll see less conflicts.

bootstrap.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
# Usage: scripts/bootstrap
3+
4+
set -eu
5+
6+
mkdir -p .git/hooks
7+
ln -s ../../scripts/sock-sort.sh .git/hooks/pre-commit

0 commit comments

Comments
 (0)