Fix broken config.fish symlinks during install (#171)

Credits to @tuvistavie
https://github.com/fisherman/fisherman/issues/16#issuecomment-201699699

closes 16
This commit is contained in:
Aristides 2016-04-13 15:48:39 +02:00 committed by Jorge Bucaran
parent 79b9dcd405
commit aaf5654f06

View File

@ -48,7 +48,7 @@ $(FISH_CONFIG):
echo "set fisher_config $(FISHER_CONFIG)" | sed "s|$$HOME|~|" >> $@.fisher echo "set fisher_config $(FISHER_CONFIG)" | sed "s|$$HOME|~|" >> $@.fisher
echo "source \$$fisher_home/config.fish" >> $@.fisher echo "source \$$fisher_home/config.fish" >> $@.fisher
awk 'FNR==NR{ print; a[$$0]; next } !($$0 in a) || /^$$/' $@ $@.fisher > $@.tmp awk 'FNR==NR{ print; a[$$0]; next } !($$0 in a) || /^$$/' $@ $@.fisher > $@.tmp
mv $@.tmp $@ && rm $@.fisher cat "$@.tmp" > $@ && rm $@.fisher
$(FISHER_CACHE): $(FISHER_CACHE):
mkdir -p $@ mkdir -p $@