Commit 905f6afa authored by Bruno Pinto's avatar Bruno Pinto

Remove pkg-/theme- from folder name

When installing packages (plugins) or themes using a URL, we should
strip the plugin-/pkg-/theme- from the repository name if it exists.
parent e9472b4e
......@@ -36,7 +36,7 @@ function omf.install -a type_flag name_or_url
if test -e $OMF_PATH/db/$parent_path/$name_or_url
set target $parent_path/$name_or_url
else
set -l local_name (basename $name_or_url)
set -l local_name (basename $name_or_url | sed "s/^pkg-//;s/^plugin-//;s/^theme-//")
if test -e $OMF_PATH/$parent_path/$local_name
echo (omf::err)"Error: $local_name $install_type already installed."(omf::off) 1^&2
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment