diff --git a/README.md b/README.md index 0da5a6b..07dbb34 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +Additions to avoid `Directory nonexistent` error. +
diff --git a/install.sh b/install.sh index c254bf3..5c1d08d 100755 --- a/install.sh +++ b/install.sh @@ -9,7 +9,11 @@ sudo tee /etc/apt/sources.list.d/makedeb.list sudo apt-get update && sudo apt-get install makedeb +# UNA-NONEXISTENT: Adding nonexistent directory + sudo mkdir -p /etc/una + git clone https://mpr.makedeb.org/una-bin.git && cd una-bin + makedeb -H "MPR-Package: una-bin" -H "MPR-Version: 3.2.0" -si && cd .. && rm -rf una-bin una update; una help diff --git a/una b/una index a048585..8323cf7 100755 --- a/una +++ b/una @@ -551,6 +551,9 @@ fi trap "rm -f "${LOCKFILE:?}"; tput cnorm; exit" INT TERM EXIT echo $$ > ${LOCKFILE} +# UNA-NONEXISTENT: Adding nonexistent directory + sudo mkdir -p /etc/una + if [[ ! -d '/var/lib/una' ]] || { [[ ! -f '/var/lib/una/status' ]] || { [[ ! -f "$HOME/.config/autostart/una-updater.desktop" ]] || { [[ ! -f '/var/lib/una/cache' ]] || { [[ ! -d "${HOME}/.cache/una" ]] || [[ ! -f "/etc/una/config" ]]; } } } }; then echo info 'creating una directory and config files' @@ -565,6 +568,8 @@ X-GNOME-Autostart-enabled=true Name=Una Updater Comment=Auto-updater for APT and MPR packages. EOF + # UNA-NONEXISTENT: Adding nonexistent directory + sudo mkdir -p /etc/una sudo sh -c "echo 'auto_update=true # enable/disable update notifications; set to true or false' >/etc/una/config" sudo sh -c "echo 'update_check_gap=1d # time gap between checking for updates if auto_update=true; s for seconds (the default), m for minutes, h for hours or d for days' >/etc/una/config" sudo mkdir -p /var/lib/una /etc/una diff --git a/una-updater b/una-updater index 3531c7b..f28ac5b 100755 --- a/una-updater +++ b/una-updater @@ -16,6 +16,9 @@ _ui() { zenity --question --text 'Updated packages are available. Do you wish to upgrade?' --width 200 && x-terminal-emulator -e 'una upgrade; echo; echo "You can now close this window or press ENTER to close."; read enter' & } +# UNA-NONEXISTENT: Adding nonexistent directory + sudo mkdir -p /etc/una + while true; do source /etc/una/config &>/dev/null if [[ "${auto_update}" == "true" ]]; then