mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Blow away existing $fish_data_dir on (re)install
Fixes #4314 (under cmake, at least)
This commit is contained in:
parent
9f3059b7f4
commit
e35983438e
2 changed files with 13 additions and 17 deletions
|
@ -59,6 +59,14 @@ FUNCTION(FISH_CREATE_DIRS)
|
||||||
ENDFOREACH(dir)
|
ENDFOREACH(dir)
|
||||||
ENDFUNCTION(FISH_CREATE_DIRS)
|
ENDFUNCTION(FISH_CREATE_DIRS)
|
||||||
|
|
||||||
|
FUNCTION(FISH_TRY_REMOVE)
|
||||||
|
FOREACH(dir ${ARGV})
|
||||||
|
IF(EXISTS ${CMAKE_INSTALL_PREFIX}/${dir})
|
||||||
|
FILE(REMOVE_RECURSE ${CMAKE_INSTALL_PREFIX}/${dir})
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
ENDFUNCTION(FISH_TRY_REMOVE)
|
||||||
|
|
||||||
FUNCTION(FISH_TRY_CREATE_DIRS)
|
FUNCTION(FISH_TRY_CREATE_DIRS)
|
||||||
FOREACH(dir ${ARGV})
|
FOREACH(dir ${ARGV})
|
||||||
IF(NOT IS_ABSOLUTE ${dir})
|
IF(NOT IS_ABSOLUTE ${dir})
|
||||||
|
@ -90,16 +98,8 @@ INSTALL(TARGETS ${PROGRAMS}
|
||||||
FISH_CREATE_DIRS(${sysconfdir}/fish/conf.d)
|
FISH_CREATE_DIRS(${sysconfdir}/fish/conf.d)
|
||||||
INSTALL(FILES etc/config.fish DESTINATION ${sysconfdir}/fish/)
|
INSTALL(FILES etc/config.fish DESTINATION ${sysconfdir}/fish/)
|
||||||
|
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish
|
FISH_TRY_REMOVE(${rel_datadir}/fish)
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/completions
|
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/functions
|
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/groff
|
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/man/man1
|
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools
|
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config
|
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config/js
|
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config/partials
|
|
||||||
# $v $(INSTALL) -m 755 -d $(DESTDIR)$(datadir)/fish/tools/web_config/sample_prompts
|
|
||||||
FISH_CREATE_DIRS(${rel_datadir}/fish ${rel_datadir}/fish/completions
|
FISH_CREATE_DIRS(${rel_datadir}/fish ${rel_datadir}/fish/completions
|
||||||
${rel_datadir}/fish/functions ${rel_datadir}/fish/groff
|
${rel_datadir}/fish/functions ${rel_datadir}/fish/groff
|
||||||
${rel_datadir}/fish/man/man1 ${rel_datadir}/fish/tools
|
${rel_datadir}/fish/man/man1 ${rel_datadir}/fish/tools
|
||||||
|
|
|
@ -273,18 +273,14 @@ function __fish_expand_pid_args
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function __fish_expand_fg
|
function fg --wraps fg
|
||||||
builtin fg (__fish_expand_pid_args $argv)
|
builtin fg (__fish_expand_pid_args $argv)
|
||||||
end
|
end
|
||||||
|
|
||||||
function __fish_expand_bg
|
function bg --wraps bg
|
||||||
builtin bg (__fish_expand_pid_args $argv)
|
builtin bg (__fish_expand_pid_args $argv)
|
||||||
end
|
end
|
||||||
|
|
||||||
function __fish_expand_wait
|
function wait --wraps wait
|
||||||
builtin wait (__fish_expand_pid_args $argv)
|
builtin wait (__fish_expand_pid_args $argv)
|
||||||
end
|
end
|
||||||
|
|
||||||
alias fg __fish_expand_fg
|
|
||||||
alias bg __fish_expand_bg
|
|
||||||
alias wait __fish_expand_wait
|
|
||||||
|
|
Loading…
Reference in a new issue