oh-my-fish/tests/run.fish

27 lines
442 B
Fish
Raw Normal View History

#!/usr/bin/env fish
2015-09-22 04:49:52 +08:00
# TODO: This is only a basic draft.
set -l return_code 0
omf list | grep apt 2>&1 >/dev/null
set -l apt_installed_previously $status
if test $apt_installed_previously -eq 0
omf remove apt
end
set commands "omf help" "omf doctor" "omf install apt"
for cmd in $commands
echo \$ $cmd
if not eval $cmd
set return_code 1
end
end
if test $apt_installed_previously -ne 0
omf remove apt
end
exit $return_code