fixed path bug in nc script
This commit is contained in:
parent
9b357d7d82
commit
d66feaa4d7
@ -16,9 +16,7 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FILENAME=$(basename $FILE_PATH)
|
$SCRIPTPATH/nc-share-file.sh "$FILE_PATH" \
|
||||||
|
|
||||||
$SCRIPTPATH/nc-share-file.sh "$FILENAME" \
|
|
||||||
| perl -n -e '/([a-zA-Z0-9]+)$/ && print $1' \
|
| perl -n -e '/([a-zA-Z0-9]+)$/ && print $1' \
|
||||||
| awk -n -e '{print "https://pb.kapelle.org/"$1}'
|
| awk -n -e '{print "https://pb.kapelle.org/"$1}'
|
||||||
|
|
||||||
|
@ -14,13 +14,11 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
FILENAME=$(basename $FILE_PATH)
|
if file -i -b "$FILE_PATH" | grep "text" &> /dev/null; then
|
||||||
|
$SCRIPTPATH/nc-share-text.sh "$FILE_PATH"
|
||||||
if file -i -b "$FILENAME" | grep "text" &> /dev/null; then
|
elif file -i -b "$FILE_PATH" | grep "image" &> /dev/null; then
|
||||||
$SCRIPTPATH/nc-share-text.sh "$FILENAME"
|
$SCRIPTPATH/nc-share-file.sh "$FILE_PATH" | awk '{print $1"/preview"}'
|
||||||
elif file -i -b "$FILENAME" | grep "image" &> /dev/null; then
|
|
||||||
$SCRIPTPATH/nc-share-file.sh "$FILENAME" | awk '{print $1"/preview"}'
|
|
||||||
else
|
else
|
||||||
$SCRIPTPATH/nc-share-file.sh "$FILENAME"
|
$SCRIPTPATH/nc-share-file.sh "$FILE_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user