Fix symlink command on Linux
This commit is contained in:
parent
cefab517a5
commit
172396583f
|
@ -190,7 +190,7 @@ expand_unix_path_if_not_symlink_or_absolute() {
|
|||
echo $path
|
||||
}
|
||||
|
||||
# Moves a single file. Optionally provide a new file name as a third param.
|
||||
# Moves a single file. Optionally provide a new file name as a third param.
|
||||
move_file() {
|
||||
local src="$1"
|
||||
local src_expanded=$(expand_path "$src")
|
||||
|
@ -216,7 +216,7 @@ move_file() {
|
|||
fi
|
||||
}
|
||||
|
||||
# Copies a single file. Optionally provide a new file name as a third param.
|
||||
# Copies a single file. Optionally provide a new file name as a third param.
|
||||
# If you want to copy all files with a specific extension then use copy_dir_files.
|
||||
copy_file() {
|
||||
local src="$1"
|
||||
|
@ -375,6 +375,8 @@ make_link() {
|
|||
if [[ $dest_has_space -eq 1 ]]; then cmd_dest_path="\"$cmd_dest_path\""; fi
|
||||
link_cmd="cmd //c 'mklink $cmd_dest_path $cmd_source_path'"
|
||||
else
|
||||
cmd_source_path="$final_src"
|
||||
cmd_dest_path="$final_dest"
|
||||
if [[ $source_has_space -eq 1 ]]; then cmd_source_path="\"$cmd_source_path\""; fi
|
||||
if [[ $dest_has_space -eq 1 ]]; then cmd_dest_path="\"$cmd_dest_path\""; fi
|
||||
link_cmd="ln -sf $cmd_source_path $cmd_dest_path"
|
||||
|
|
Loading…
Reference in New Issue
Block a user