Added checker script

master
BrainwreckedTech 4 years ago
parent 92d74e91bf
commit 873db61fdb

@ -0,0 +1,13 @@
#!/usr/bin/env sh
while IFS= read -r -d $'\0'; do
CACHEDIR=$(grep '^Exec' "${REPLY}" | sed "s/Exec=.* --user-data-dir='\(.*\)'/\1/g" | sed "s/'.*//g")
if [ -d "${CACHEDIR}" ]; then
printf '\r\033[K%s' "${CACHEDIR}"
else
cp -r "${CACHEDIR/pwa-*/pwa-default}" "${CACHEDIR}"
printf '\r\033[KCreated %s\n' "${CACHEDIR}"
fi
done < <(find "${HOME}/.local/share/applications/pwa" -type f -name '*.desktop' -print0)
printf '\r\033[K'
Loading…
Cancel
Save