commit 0c2265526fa0fdd5dab89aedcee700c223fc032b
parent 94b00e3913e7bd8d7e973338cad108ad33fa7352
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date: Sat, 11 Apr 2020 22:04:24 -0500
Add script to replace files with IPFS symlinks
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/.local/bin/starlink b/.local/bin/starlink
@@ -0,0 +1,5 @@
+#!/usr/bin/env sh
+
+# Replaces files in given directory with IPFS symlinks.
+find "$1" -type f -exec \
+ sh -c 'ipfs add -q "{}" | xargs -I@ ln -sf /ipfs/@ "{}"' \;