Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(install): improved symbolic link #225

Merged
merged 4 commits into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions setup/install.ab
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ main(args) {
exit(1)
}

// Remove the archive
// Delete the archive
${sudo} rm {place}/{archive}$ failed {
echo "Failed to remove downloaded archive at {place}/{archive}"
exit(1)
Expand All @@ -112,10 +112,19 @@ main(args) {
exit(1)
}

// Delete the previous symbolic link
if file_exist("{bins_folder}/{target}") {
${sudo} rm "{bins_folder}/{target}" failed {
echo "Failed to remove the previous amber symbol link."
echo "Please make sure that root user can access {bins_folder} directory."
exit(1)
}
}

// Create amber symbol link
${sudo} ln -s "{place}/{target}" "{bins_folder}/{target}"$ failed {
echo "Failed to create amber symbol link."
echo "Please make sure that root user can access /usr/local/bin directory."
echo "Please make sure that root user can access {bins_folder} directory."
exit(1)
}

Expand Down