File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,24 @@ KU_UPDATE_MD=${KU_DIR}/updated-md.sql
1414# Inport logmsg function
1515. ${KU_DIR} /scripts/ku-lib.sh
1616
17+ delete_dir () {
18+ del_dir=" $1 "
19+ # Protect against deleting anything outside of the ku directory
20+ case " $del_dir " in
21+ " /mnt/onboard/.adds/kobo-uncaged/" * )
22+ if [ -d " $del_dir " ] ; then
23+ logmsg " I" " Directory ${del_dir} exists. Deleting..."
24+ rm -rf " $del_dir "
25+ fi
26+ ;;
27+ * ) logmsg " W" " ${del_dir} not in ${KU_DIR} . Not deleting" ;;
28+ esac
29+ }
30+
31+ # Cleanup 'static' and 'template' directories from older versions
32+ delete_dir " ${KU_DIR} /static"
33+ delete_dir " ${KU_DIR} /templates"
34+
1735call_sqlite () {
1836 sql_file=" $1 "
1937 sqlite_err=$( $SQLITE_BIN $NICKEL_DB 2>&1 > /dev/null << EOF
You can’t perform that action at this time.
0 commit comments