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
fb6c2992
Commit
fb6c2992
authored
Aug 29, 2016
by
Stephen M. Coakley
Committed by
GitHub
Aug 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not overwrite themes when installing from bundle (#385)
parent
87cce305
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
23 deletions
+19
-23
pkg/omf/functions/cli/omf.cli.install.fish
pkg/omf/functions/cli/omf.cli.install.fish
+5
-0
pkg/omf/functions/packages/omf.packages.install.fish
pkg/omf/functions/packages/omf.packages.install.fish
+14
-23
No files found.
pkg/omf/functions/cli/omf.cli.install.fish
View file @
fb6c2992
...
...
@@ -10,6 +10,11 @@ function omf.cli.install
omf.packages.install $package;
and require $package
# If package is a theme, set it to active.
if contains "$package" (omf.packages.list --installed --theme)
omf.theme.set "$package"
end
test $status != 0;
and set fail_count (math $fail_count + 1)
end
...
...
pkg/omf/functions/packages/omf.packages.install.fish
View file @
fb6c2992
...
...
@@ -11,7 +11,6 @@ function __omf.packages.install.error.already
end
function omf.packages.install -a name_or_url
if test \( -e $OMF_PATH/db/themes/$name_or_url \) -o (echo $name_or_url | grep theme-)
set install_type "theme"
set parent_path "themes"
...
...
@@ -29,34 +28,26 @@ function omf.packages.install -a name_or_url
end
if test -e $OMF_PATH/$parent_path/$name
if test "$install_type" = theme
omf.theme.set $name
else
__omf.packages.install.error.already "$install_type $name_or_url"
return $OMF_INVALID_ARG
end
else
echo (omf::dim)"Installing $install_type $name"(omf::off)
if omf.repo.clone $url $OMF_PATH/$parent_path/$name
omf.bundle.install $OMF_PATH/$parent_path/$name/bundle
omf.bundle.add $install_type $name_or_url
__omf.packages.install.error.already "$install_type $name_or_url"
return $OMF_INVALID_ARG
end
# Run the install hook.
if not omf.packages.run_hook $OMF_PATH/$parent_path/$name install
__omf.packages.install.error "$install_type $name"
return $OMF_UNKNOWN_ERR
end
echo (omf::dim)"Installing $install_type $name"(omf::off)
__omf.packages.install.success "$install_type $name"
if omf.repo.clone $url $OMF_PATH/$parent_path/$name
omf.bundle.install $OMF_PATH/$parent_path/$name/bundle
omf.bundle.add $install_type $name_or_url
if test "$install_type" = theme
omf.theme.set $name
end
else
# Run the install hook.
if not omf.packages.run_hook $OMF_PATH/$parent_path/$name install
__omf.packages.install.error "$install_type $name"
return $OMF_UNKNOWN_ERR
end
__omf.packages.install.success "$install_type $name"
else
__omf.packages.install.error "$install_type $name"
return $OMF_UNKNOWN_ERR
end
return 0
...
...
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