20 lines
253 B
Bash
Executable File
20 lines
253 B
Bash
Executable File
#!/bin/bash
|
|
|
|
upd() {
|
|
checkupdates | wc -l > /tmp/checkupdates
|
|
}
|
|
|
|
if [[ ! -f /tmp/checkupdates ]]; then
|
|
upd
|
|
fi
|
|
|
|
count=$(cat /tmp/checkupdates)
|
|
status="$count updates"
|
|
if [[ $count -eq 0 ]]; then
|
|
status="Up to date"
|
|
fi
|
|
|
|
echo "$status"
|
|
|
|
upd & disown
|