Start work on migration to global directory
parent
f892269aff
commit
6fa235a825
|
|
@ -186,8 +186,6 @@ _bash-it-migrate() {
|
||||||
do
|
do
|
||||||
typeset ff=$(basename $f)
|
typeset ff=$(basename $f)
|
||||||
|
|
||||||
# Only process the ones that don't use the new structure
|
|
||||||
if ! [[ $ff =~ ^[0-9]*$BASH_IT_LOAD_PRIORITY_SEPARATOR.*\.bash$ ]] ; then
|
|
||||||
# Get the type of component from the extension
|
# Get the type of component from the extension
|
||||||
typeset single_type=$(echo $ff | sed -e 's/.*\.\(.*\)\.bash/\1/g' | sed 's/aliases/alias/g')
|
typeset single_type=$(echo $ff | sed -e 's/.*\.\(.*\)\.bash/\1/g' | sed 's/aliases/alias/g')
|
||||||
typeset component_name=$(echo $ff | cut -d'.' -f1)
|
typeset component_name=$(echo $ff | cut -d'.' -f1)
|
||||||
|
|
@ -199,7 +197,6 @@ _bash-it-migrate() {
|
||||||
|
|
||||||
$disable_func $component_name
|
$disable_func $component_name
|
||||||
$enable_func $component_name
|
$enable_func $component_name
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
shopt -u nullglob
|
shopt -u nullglob
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -207,10 +207,10 @@ function local_setup {
|
||||||
|
|
||||||
@test "bash-it: run the migrate command without anything to migrate" {
|
@test "bash-it: run the migrate command without anything to migrate" {
|
||||||
run _enable-plugin "ssh"
|
run _enable-plugin "ssh"
|
||||||
assert [ -L "$BASH_IT/plugins/enabled/250---ssh.plugin.bash" ]
|
assert [ -L "$BASH_IT/enabled/250---ssh.plugin.bash" ]
|
||||||
|
|
||||||
run _bash-it-migrate
|
run _bash-it-migrate
|
||||||
assert [ -L "$BASH_IT/plugins/enabled/250---ssh.plugin.bash" ]
|
assert [ -L "$BASH_IT/enabled/250---ssh.plugin.bash" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@test "bash-it: verify that existing components are automatically migrated when something is enabled" {
|
@test "bash-it: verify that existing components are automatically migrated when something is enabled" {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue