misc/xcheckupdates: improve update preview
This commit is contained in:
parent
e3f60f0704
commit
4cea246186
|
@ -9,14 +9,14 @@ if [[ -e $IDCACHE ]]; then
|
||||||
fi
|
fi
|
||||||
sudo xbps-install -S &>/dev/null
|
sudo xbps-install -S &>/dev/null
|
||||||
updates=$(xbps-install -un 2>&1)
|
updates=$(xbps-install -un 2>&1)
|
||||||
num_updates=$(echo -n $updates | wc -l)
|
num_updates=$(echo $updates | wc -l)
|
||||||
|
|
||||||
if [[ $list ]]; then
|
if [[ $list ]]; then
|
||||||
echo -n $updates
|
echo -n $updates
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $num_updates -gt 0 ]]; then
|
if [[ $num_updates -gt 0 ]]; then
|
||||||
notify-send -p ${prev_id+-r} $prev_id --icon=$ICON -t 0 "$num_updates Updates available"
|
notify-send -p ${prev_id+-r} $prev_id --icon=$ICON -t 0 "$num_updates Updates available $(echo; awk '{ print " -",$1 }' <<<$updates | head -n 10; if [[ $num_updates -gt 10 ]]; then echo " ..."; fi)"
|
||||||
else
|
else
|
||||||
notify-send -p ${prev_id+-r} $prev_id -t 1500 "Updates checked, nothing new"
|
notify-send -p ${prev_id+-r} $prev_id -t 1500 "Updates checked, nothing new"
|
||||||
fi > $IDCACHE
|
fi > $IDCACHE
|
||||||
|
|
|
@ -11,6 +11,7 @@ opts=(
|
||||||
"-Dsbt.repository.config=$XDG_CONFIG_HOME/sbt/repositories"
|
"-Dsbt.repository.config=$XDG_CONFIG_HOME/sbt/repositories"
|
||||||
"-Dsbt.global.settings=$XDG_CONFIG_HOME/sbt/global"
|
"-Dsbt.global.settings=$XDG_CONFIG_HOME/sbt/global"
|
||||||
"-Dsbt.global.plugins=$XDG_CONFIG_HOME/sbt/plugins"
|
"-Dsbt.global.plugins=$XDG_CONFIG_HOME/sbt/plugins"
|
||||||
|
"-Dsbt.override.build.repos=true"
|
||||||
)
|
)
|
||||||
export SBT_OPTS=${(j: :)opts}
|
export SBT_OPTS=${(j: :)opts}
|
||||||
$(next-in-path sbt $0) $@
|
$(next-in-path sbt $0) $@
|
||||||
|
|
Loading…
Reference in a new issue