check file exist and not empty
This commit is contained in:
parent
4dd767877f
commit
8823cd08ba
|
@ -33,7 +33,7 @@ self_name=$(sbotc query.read '{"query":[{"$filter":{"value":{"author": "'"$self"
|
|||
ipfsnodeid=$(ipfs id -f='<id>\n')
|
||||
|
||||
current_ts=$(date -u +%s%N | cut -b1-13)
|
||||
[ -f ~/.zen/zenyta.last.ts ] && last_ts=$(cat ~/.zen/zenyta.last.ts) || last_ts=$((current_ts - 24*3600*1000 - 1)) # 24h ago
|
||||
[ -s ~/.zen/zenyta.last.ts ] && last_ts=$(cat ~/.zen/zenyta.last.ts) || last_ts=$((current_ts - 24*3600*1000 - 1)) # 24h ago
|
||||
|
||||
echo "last timestamp: $last_ts"
|
||||
echo '
|
||||
|
|
|
@ -32,9 +32,8 @@ g1self=$(echo $self | cut -d '@' -f 2 | cut -d '.' -f 1 | base64 -d | base58)
|
|||
self_name=$(sbotc query.read '{"query":[{"$filter":{"value":{"author": "'"$self"'", "content":{"type":"about", "about": "'"$self"'"}}}}]}' | jq -r .value?.content?.name | grep -v null | tail -n 1)
|
||||
ipfsnodeid=$(ipfs id -f='<id>\n')
|
||||
|
||||
|
||||
current_ts=$(date -u +%s%N | cut -b1-13)
|
||||
[ -f ~/.zen/zenytv.last.ts ] && last_ts=$(cat ~/.zen/zenytv.last.ts) || last_ts=$((current_ts - 24*3600*1000 - 1)) # 24h ago
|
||||
[ -s ~/.zen/zenytv.last.ts ] && last_ts=$(cat ~/.zen/zenytv.last.ts) || last_ts=$((current_ts - 24*3600*1000 - 1)) # 24h ago
|
||||
|
||||
echo "last timestamp: $last_ts"
|
||||
echo '
|
||||
|
|
|
@ -393,7 +393,6 @@ if [[ "${PASSENGERNAME}" != "" ]]; then
|
|||
[:pig_nose:_IPFS_:pig_nose:](http://127.0.0.1:8080/ipfs/$IPASSENGER/$PASSENGERNAME)
|
||||
[${extractor}](https://youtu.be/${youtubeid}) ${duration} s by ${uploader_id}
|
||||
|
||||
|
||||
**ZEN=$ZEN($READ/$PARK)**
|
||||
|
||||
#zenbot #astroport
|
||||
|
|
Loading…
Reference in New Issue