DSK: Add IPFS support
This commit is contained in:
parent
9f17bb0f3e
commit
206c57e1bb
@ -15,6 +15,10 @@ for term in konsole xfce4-terminal urxvt xterm; do
|
||||
fi
|
||||
done
|
||||
|
||||
if command -v go > /dev/null 2>&1; then
|
||||
export PATH="$PATH:$HOME/.local/go/bin"
|
||||
fi
|
||||
|
||||
export DSK_FLAG_MASK=""
|
||||
export DSK_CURRENT_DESKTOP="$DSK_NAME"
|
||||
|
||||
|
21
.config/dsk/run/ipfs
Executable file
21
.config/dsk/run/ipfs
Executable file
@ -0,0 +1,21 @@
|
||||
#! /usr/bin/env bash
|
||||
if ! command -v ipfs > /dev/null 2>&1; then
|
||||
echo "IPFS is not installed"
|
||||
exit 0
|
||||
fi
|
||||
ipfs daemon &
|
||||
# The following sets up the IPFS FUSE daemon
|
||||
if command -v fusermount; then
|
||||
ipfspath="$HOME/IPFS"
|
||||
ipnspath="$HOME/IPNS"
|
||||
for path in "$ipfspath" "$ipnspath"; do
|
||||
mkdir -P "$path"
|
||||
fusermount -u "$path"
|
||||
done
|
||||
# PIDless busy sleep trick
|
||||
exec 1023<> <(:)
|
||||
read -r -t 3 -u 1023
|
||||
ipfs mount --ipfs-path="$ipfspath" --ipns-path="$ipnspath"
|
||||
fi
|
||||
wait
|
||||
|
Loading…
Reference in New Issue
Block a user