mirror of
https://github.com/NixOS/nix
synced 2025-06-24 22:11:15 +02:00
Merge 3349cbaf77
into 46853c467d
This commit is contained in:
commit
f266a72bdc
1 changed files with 7 additions and 4 deletions
|
@ -888,12 +888,15 @@ configure_shell_profile() {
|
||||||
_sudo "to back up your current $profile_target to $profile_target$PROFILE_BACKUP_SUFFIX" \
|
_sudo "to back up your current $profile_target to $profile_target$PROFILE_BACKUP_SUFFIX" \
|
||||||
cp "$profile_target" "$profile_target$PROFILE_BACKUP_SUFFIX"
|
cp "$profile_target" "$profile_target$PROFILE_BACKUP_SUFFIX"
|
||||||
else
|
else
|
||||||
# try to create the file if its directory exists
|
# try to create the file
|
||||||
|
# If the directory does not exists, create it
|
||||||
target_dir="$(dirname "$profile_target")"
|
target_dir="$(dirname "$profile_target")"
|
||||||
if [ -d "$target_dir" ]; then
|
if [ ! -d "$target_dir" ]; then
|
||||||
_sudo "to create a stub $profile_target which will be updated" \
|
_sudo "to create the $target_dir directory which is missing" \
|
||||||
touch "$profile_target"
|
mkdir -p "$target_dir"
|
||||||
fi
|
fi
|
||||||
|
_sudo "to create a stub $profile_target which will be updated" \
|
||||||
|
touch "$profile_target"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e "$profile_target" ]; then
|
if [ -e "$profile_target" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue