mirror of
https://github.com/rclone/rclone.git
synced 2024-11-28 19:34:55 +01:00
aed77a8fb2
The latter is more portable, while the former only works on systems where /bin/bash exists (or is symlinked appropriately).
15 lines
435 B
Bash
Executable File
15 lines
435 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if [[ ! -z $(git status --short --untracked-files=no) ]]; then
|
|
echo "Detected uncommitted changes - commit before running this"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Installing deadlock detector - use 'git reset --hard HEAD' to undo"
|
|
|
|
go get -v github.com/sasha-s/go-deadlock/...
|
|
find . -type f -name "*.go" -print0 | xargs -0 sed -i~ 's/sync.RWMutex/deadlock.RWMutex/; s/sync.Mutex/deadlock.Mutex/;'
|
|
goimports -w .
|
|
|
|
echo "Done"
|