empty file test

This commit is contained in:
qo-op 2020-12-16 23:24:17 +01:00
parent 4c29fc1fe3
commit 12fe55ea21
2 changed files with 8 additions and 6 deletions

View File

@ -8,9 +8,10 @@
# Create Astroport(pastebin) index for Xbian/Vstream
# ipfs publish with xbian key
########################################################################
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid ]] && echo "ERROR no _xbian.zuid" && exit 1
file="$1"
mkdir -p ~/astroport/animes
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid ]] && echo "ERROR no _xbian.zuid" && exit 1
[[ $file == "" ]] && echo "ERROR NO FILE $file" && exit 1
# GET XZUID
XZUID=$(cat ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid)
@ -21,6 +22,7 @@ XZUID=$(cat ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid)
### Animes
echo "ADDING ~/astroport/animes/ to IPFS. should be only one file"
echo "-----------------------------------------------------------------"
AASHARE=$(ipfs add -rq ~/astroport/animes/ | tail -n 1)
[[ $AASHARE == "" ]] && echo "ipfs add ERROR" && exit 1
@ -29,7 +31,7 @@ echo "-----------------------------------------------------------------"
mkdir -p ~/.zen/ipfs/xbian
[[ ! -f ~/.zen/ipfs/xbian/A${XZUID} ]] && echo "CAT;TITLE;URLS" > ~/.zen/ipfs/xbian/A${XZUID}
file="$1"
filename=$(basename -- "$file")
extension="${filename##*.}"
filena="${filename%.*}"

View File

@ -8,9 +8,10 @@
# Create Astroport(pastebin) index for Xbian/Vstream
# ipfs publish ~/.zen/xbian/INDEXes with xbian key
########################################################################
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid ]] && echo "ERROR no _xbian.zuid" && exit 1
file="$1"
mkdir -p ~/astroport/films
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid ]] && echo "ERROR no _xbian.zuid" && exit 1
[[ $file == "" ]] && echo "ERROR NO FILE $file" && exit 1
# GET XZUID
XZUID=$(cat ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid)
@ -30,7 +31,6 @@ echo "-----------------------------------------------------------------"
mkdir -p ~/.zen/ipfs/xbian
[[ ! -f ~/.zen/ipfs/xbian/F${XZUID} ]] && echo "CAT;TITLE;URLS" > ~/.zen/ipfs/xbian/F${XZUID}
file="$1"
filename=$(basename -- "$file")
extension="${filename##*.}"
filena="${filename%.*}"