Fixed bug in copy readme function. Removed unused log function.

This commit is contained in:
stormdragon2976
2023-04-03 17:24:28 -04:00
parent 6beca18c21
commit b96b36137b

View File

@@ -27,18 +27,6 @@ export TEXTDOMAIN=notestorm
export TEXTDOMAINDIR=/usr/share/locale
source gettext.sh
# Log writing function
log() {
# Usage: command | log for just stdout.
# Or command |& log for stderr and stdout.
while read -r line ; do
echo "$line" | tee -a "$logFile" &> /dev/null
done
}
# Log file name is ~/.cache/scriptname
logFile="${HOME}/.cache/${0##*/}"
# Functions section
@@ -216,7 +204,7 @@ original_note() {
if [[ -f "README.md" ]]; then
cp "README.md" "${xdgPath}/notestorm/notes/README.md"
elif [[ -f "/usr/share/doc/notestorm/README.md" ]]; then
cp "README.md" "${xdgPath}/notestorm/notes/README.md"
cp "/usr/share/doc/notestorm/README.md" "${xdgPath}/notestorm/notes/README.md"
else
echo "The README file is missing. Pleae visit the notestorm git page for usage information." > "${xdgPath}/notestorm/notes/README.md"
fi