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
2535892c
Commit
2535892c
authored
Aug 29, 2015
by
Derek Stavis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
omf.install: insert installed packages into bundle
parent
e8dcbb50
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
10 deletions
+32
-10
pkg/omf/cli/omf.install.fish
pkg/omf/cli/omf.install.fish
+32
-10
No files found.
pkg/omf/cli/omf.install.fish
View file @
2535892c
function omf.install -a type_flag name_or_url
function _write_bundle
set bundle $OMF_CONFIG/bundle
set record $argv
if test -f $bundle
if not grep $record $bundle > /dev/null 2>&1
echo $record >> $bundle
end
else
echo $record > $bundle
end
end
function _display_success
echo (omf::em)"✔ $argv succesfully installed."(omf::off)
end
function _display_error
echo (omf::err)"Could not install $argv."(omf::off) 1^&2
return $OMF_UNKNOWN_ERR
end
switch $type_flag
case "--theme"
set install_type "theme"
...
...
@@ -19,11 +41,11 @@ function omf.install -a type_flag name_or_url
echo (omf::err)"Error: $local_name $install_type already installed."(omf::off) 1^&2
else
echo (omf::dim)"Trying to clone from URL..."(omf::off)
git clone -q $name_or_url $OMF_PATH/$parent_path/$local_name
and echo (omf::em)"✔ $local_name $install_type succesfully installed."(omf::off)
or begin
echo (omf::err)"$local_name is not a valid $install_type."(omf::off) 1^&2
return $OMF_INVALID_ARG
if
git clone -q $name_or_url $OMF_PATH/$parent_path/$local_name
_write_bundle "$install_type $name_or_url"
_display_success "$install_type $name_or_url"
else
_display_error "$install_type $name_or_url"
end
end
return 0
...
...
@@ -37,11 +59,11 @@ function omf.install -a type_flag name_or_url
echo (omf::em)"✔ $name_or_url $install_type up to date."(omf::off)
else
echo (omf::dim)"Installing $name_or_url $install_type..."(omf::off)
git clone (cat $OMF_PATH/db/$target) $OMF_PATH/$target >/dev/null ^&1
and echo (omf::em)"✔ $name_or_url $install_type successfully installed."(omf::off)
or begin
echo (omf::err)"Could not install $install_type."(omf::off) 1^&2
return $OMF_UNKNOWN_ERR
if
git clone (cat $OMF_PATH/db/$target) $OMF_PATH/$target >/dev/null ^&1
_write_bundle "$install_type $name_or_url"
_display_success "$install_type $name_or_url"
else
_display_error "$install_type $name_or_url"
end
end
end
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