Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
O
oh-my-fish
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
oh-my-fish
Commits
cc7b3212
Commit
cc7b3212
authored
Oct 12, 2015
by
Bruno Pinto
Committed by
Pablo Santiago Blum de Aguiar
Oct 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create `omf.update` function
Update and install were one thing before.
parent
c3467317
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
pkg/omf/cli/omf.update.fish
pkg/omf/cli/omf.update.fish
+25
-0
pkg/omf/omf.fish
pkg/omf/omf.fish
+5
-3
No files found.
pkg/omf/cli/omf.update.fish
0 → 100644
View file @
cc7b3212
function omf.update -a name
function __omf.update.success
echo (omf::em)"✔ $argv successfully updated."(omf::off)
end
function __omf.update.error
echo (omf::err)"Could not update $argv."(omf::off) 1^&2
end
if test \( -e $OMF_PATH/themes/$name \) -o \( -e $OMF_CONFIG/themes/$name \)
set install_type "theme"
set parent_path "themes"
else
set install_type "package"
set parent_path "pkg"
end
for path in {$OMF_PATH,$OMF_CONFIG}/pkg/$name
not test -e "$path/.git"; and continue
omf.repo.pull $path; and set return_success
end
set -q return_success; and __omf.update.success "$name"
end
pkg/omf/omf.fish
View file @
cc7b3212
...
@@ -139,10 +139,12 @@ function omf -d "Oh My Fish"
...
@@ -139,10 +139,12 @@ function omf -d "Oh My Fish"
echo (omf::err)"Oh My Fish failed to update."(omf::off)
echo (omf::err)"Oh My Fish failed to update."(omf::off)
echo "Please open a new issue here → "(omf::em)"github.com/oh-my-fish/oh-my-fish/issues"(omf::off)
echo "Please open a new issue here → "(omf::em)"github.com/oh-my-fish/oh-my-fish/issues"(omf::off)
end
end
omf.theme (cat $OMF_CONFIG/theme)
omf.install_package (omf.packages.list --installed --plugin)
refresh
for package in (omf.packages.list --installed)
omf.update $package
end
refresh
case "*"
case "*"
echo (omf::err)"$argv[1] option not recognized"(omf::off) 1^&2
echo (omf::err)"$argv[1] option not recognized"(omf::off) 1^&2
return $OMF_UNKNOWN_OPT
return $OMF_UNKNOWN_OPT
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment