mirror of
https://github.com/dustinkirkland/byobu
synced 2025-08-22 06:23:19 -07:00
* bin/time, bin/date, bin/reboot-required: use case statement, performance
improvement Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
parent
079413bb99
commit
15bc5a6fc4
1 changed files with 11 additions and 9 deletions
|
@ -18,12 +18,14 @@
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
flag="/var/run/reboot-required"
|
flag="/var/run/reboot-required"
|
||||||
if [ "$1" = "--detail" ]; then
|
case "$1" in
|
||||||
ls -alF "$flag" 2>&1
|
--detail)
|
||||||
exit 0
|
ls -alF "$flag" 2>&1
|
||||||
elif [ "$1" = "--short" ]; then
|
;;
|
||||||
[ -e "$flag" ] && printf "Yes" || printf "No"
|
--short)
|
||||||
exit 0
|
[ -e "$flag" ] && printf "Yes" || printf "No"
|
||||||
fi
|
;;
|
||||||
|
*)
|
||||||
[ -e "$flag" ] && printf "\005{=b bW}(@)\005{-} " || exit 0
|
[ -e "$flag" ] && printf "\005{=b bW}(@)\005{-} " || exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue