4 # CARGO='../fucking-cargo/fucking-cargo cargo' make && make check CARGO='../fucking-cargo/fucking-cargo cargo'
7 # Why do we need this ?
9 # https://stackoverflow.com/questions/33025887/how-to-use-a-local-unpublished-crate
10 # https://github.com/rust-lang/cargo/issues/1481
13 lock=${PWD%/*}/.fuck.lock
14 if [ "x$FUCKING_CARGO" != "x$lock" ]; then
16 exec with-lock-ex -w "$lock" "$0" "$@"
23 /^ *\[dependencies\]/,/^ \[/{
27 while read <&204 what where; do
28 if [ "x$what" = x- ]; then continue; fi
29 qwhere="${where//\//\\/}"
30 sed+=' s/^'$what' *=.*/'$what' = { path = "..\/'"${qwhere}"'" }/;
37 while read <&204 what where; do
40 sed <$wf >$wf.fucking~ "$sed"
44 while read <&204 what where; do
46 if ! test -e $wf.unfucked~; then
53 while read <&203 what where; do
55 if test -e $wf.unfucked~; then
58 mv -f $wf.unfucked~ $wf
66 while read <&204 what where; do
68 printf >&2 ' %s' "$what"
69 if cmp -s $wf.fucked~ $wf.fucking~; then
73 mv -f $wf.fucking~ $wf