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
|
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() {
|
move_file() {
|
||||||
local src="$1"
|
local src="$1"
|
||||||
local src_expanded=$(expand_path "$src")
|
local src_expanded=$(expand_path "$src")
|
||||||
|
@ -216,7 +216,7 @@ move_file() {
|
||||||
fi
|
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.
|
# If you want to copy all files with a specific extension then use copy_dir_files.
|
||||||
copy_file() {
|
copy_file() {
|
||||||
local src="$1"
|
local src="$1"
|
||||||
|
@ -375,6 +375,8 @@ make_link() {
|
||||||
if [[ $dest_has_space -eq 1 ]]; then cmd_dest_path="\"$cmd_dest_path\""; fi
|
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'"
|
link_cmd="cmd //c 'mklink $cmd_dest_path $cmd_source_path'"
|
||||||
else
|
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 [[ $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
|
if [[ $dest_has_space -eq 1 ]]; then cmd_dest_path="\"$cmd_dest_path\""; fi
|
||||||
link_cmd="ln -sf $cmd_source_path $cmd_dest_path"
|
link_cmd="ln -sf $cmd_source_path $cmd_dest_path"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user