chiark / gitweb /
use fds 203 and 204
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 28 Feb 2019 15:39:52 +0000 (15:39 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 28 Feb 2019 15:39:59 +0000 (15:39 +0000)
make jobserver can easily use 3 and then we break stuff

fucking-cargo

index 07b973d0c4a44b2af92fdd006cd68a0fb3f4390d..1a92c373ac6d483e7aa4586a6899ffaf401401b3 100755 (executable)
@@ -16,15 +16,15 @@ if [ "x$FUCKING_CARGO" != "x$lock" ]; then
        exec with-lock-ex -w "$lock" "$0" "$@"
 fi
 
-exec 3<../Fuck
+exec 203<../Fuck
 f=Cargo.toml
 
 sed='
 /^ *\[dependencies\]/,/^ \[/{
 '
 
-exec 4<../Fuck
-while read <&4 what where; do
+exec 204<../Fuck
+while read <&204 what where; do
        if [ "x$what" = x- ]; then continue; fi
        qwhere="${where//\//\\/}"
        sed+=' s/^'$what' *=.*/'$what' = { path = "..\/'"${qwhere}"'" }/;
@@ -33,15 +33,15 @@ done
 sed+='}
 '
 
-exec 4<../Fuck
-while read <&4 what where; do
+exec 204<../Fuck
+while read <&204 what where; do
        wf=../$where/$f
        rm -f $wf.fucking~
        sed <$wf >$wf.fucking~ "$sed"
 done
 
-exec 4<../Fuck
-while read <&4 what where; do
+exec 204<../Fuck
+while read <&204 what where; do
        wf=../$where/$f
        if ! test -e $wf.unfucked~; then
                ln $wf $wf.unfucked~
@@ -50,7 +50,7 @@ done
 
 trap '
        set +e
-       while read <&3 what where; do
+       while read <&203 what where; do
                wf=../$where/$f
                if test -e $wf.unfucked~; then
                        rm -f $wf.fucked~
@@ -61,9 +61,9 @@ trap '
        echo >&2 'Unfucked'
 ' EXIT
 
-exec 4<../Fuck
+exec 204<../Fuck
 printf >&2 'Fucking'
-while read <&4 what where; do
+while read <&204 what where; do
        wf=../$where/$f
        printf >&2 ' %s' "$what"
        if cmp -s $wf.fucked~ $wf.fucking~; then