Skip to content

Commit

Permalink
Add mail_msg action to view the last mail message
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed Oct 4, 2017
1 parent bc308a2 commit afa5a50
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion bin/omni
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ build_illumos()
tailpid=$!
wait $nightlypid
kill $tailpid
#cat $illumos_clone/log/mail_msg
sleep 5
}

build_omnios()
Expand All @@ -307,6 +307,17 @@ onu_illumos()
-d $illumos_clone/packages/i386/nightly-nd
}

view_mail_msg()
{
[ ! -d $illumos_clone/log ] && abort "No log directory present."
(
cd $illumos_clone/log
dir="`ls -1tr | fgrep 'log.' | tail -1`"
[ -f "$dir/mail_msg" ] || abort "Mail message not present."
LESS=-X less $dir/mail_msg
)
}

cleanup()
{
echo "Clearing temporary build directory..."
Expand Down Expand Up @@ -505,6 +516,7 @@ Operations:
update_illumos - update your local omnios illumos environment (ui)
build_illumos - build omnios-illumos (bi)
mail_msg - view mail_msg file from last build (mm)
update_omnios - update your local omnios build environment (uo)
build_omnios - build OmniOS (bo)
Expand Down Expand Up @@ -550,6 +562,7 @@ for op in "$@"; do
bi|build_illumos) build_illumos ;;
uo|update_omnios) update_omnios ;;
bo|build_omnios) build_omnios ;;
mail_msg|mm) view_mail_msg ;;
onu) onu_illumos ;;
cleanup) cleanup ;;
ud|upstream_diff) is dev && upstream_diff || help ;;
Expand Down

0 comments on commit afa5a50

Please sign in to comment.