Tahinli/forge
public0 watching
★ 0
| 1 | #!/bin/sh |
| 2 | # Roll back ~/bin/forge to ~/bin/forge.prev after a unit failed. |
| 3 | # Usage: forge-rollback <unit-name>. Output goes to the journal. |
| 4 | |
| 5 | |
| 6 | unit="" |
| 7 | bin="/bin/forge" |
| 8 | prev=".prev" |
| 9 | bad=".bad" |
| 10 | |
| 11 | if [; then |
| 12 | |
| 13 | |
| 14 | fi |
| 15 | |
| 16 | sha= |
| 17 | # Keep one hash per line, even if the file was edited by hand without a final newline. |
| 18 | if [ && [; then |
| 19 | |
| 20 | fi |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 |