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/>.
|
||||
|
||||
flag="/var/run/reboot-required"
|
||||
if [ "$1" = "--detail" ]; then
|
||||
ls -alF "$flag" 2>&1
|
||||
exit 0
|
||||
elif [ "$1" = "--short" ]; then
|
||||
[ -e "$flag" ] && printf "Yes" || printf "No"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
[ -e "$flag" ] && printf "\005{=b bW}(@)\005{-} " || exit 0
|
||||
case "$1" in
|
||||
--detail)
|
||||
ls -alF "$flag" 2>&1
|
||||
;;
|
||||
--short)
|
||||
[ -e "$flag" ] && printf "Yes" || printf "No"
|
||||
;;
|
||||
*)
|
||||
[ -e "$flag" ] && printf "\005{=b bW}(@)\005{-} " || exit 0
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue