Skip to content

Commit

Permalink
Only migrate setting if profile file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
hsoerensen committed Aug 6, 2024
1 parent beb734d commit e39f5f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,11 @@ cleanup_deprecated_files_and_folders() {
rm -rf "${voi_home}/profile" 2>/dev/null || echo "Failed to delete deprecated file: ${voi_home}/profile"
fi

if grep -q "^export VOINETWORK_IMPORT_ACCOUNT=" "${voi_home}/.profile"; then
sed -i '/^export VOINETWORK_IMPORT_ACCOUNT=/d' "${voi_home}/.profile"
unset VOINETWORK_IMPORT_ACCOUNT
if [[ -f ${voi_home}/.profile ]]; then
if grep -q "^export VOINETWORK_IMPORT_ACCOUNT=" "${voi_home}/.profile"; then
sed -i '/^export VOINETWORK_IMPORT_ACCOUNT=/d' "${voi_home}/.profile"
unset VOINETWORK_IMPORT_ACCOUNT
fi
fi
}

Expand Down

0 comments on commit e39f5f8

Please sign in to comment.