2015-09-18 01:09:26 +08:00
|
|
|
#!/usr/bin/env fish
|
|
|
|
|
2015-09-22 04:49:52 +08:00
|
|
|
# TODO: This is only a basic draft.
|
|
|
|
|
2015-09-18 01:09:26 +08:00
|
|
|
set -l return_code 0
|
|
|
|
|
2019-06-14 02:34:39 +08:00
|
|
|
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
|
|
|
|
|
2015-10-03 05:39:12 +08:00
|
|
|
set commands "omf help" "omf doctor" "omf install apt"
|
2015-09-20 19:32:31 +08:00
|
|
|
for cmd in $commands
|
|
|
|
echo \$ $cmd
|
|
|
|
if not eval $cmd
|
|
|
|
set return_code 1
|
2019-06-14 02:34:39 +08:00
|
|
|
end
|
|
|
|
end
|
2015-09-20 19:32:31 +08:00
|
|
|
|
2019-06-14 02:34:39 +08:00
|
|
|
if test $apt_installed_previously -ne 0
|
|
|
|
omf remove apt
|
|
|
|
end
|
2015-09-18 01:09:26 +08:00
|
|
|
|
|
|
|
exit $return_code
|