-
-
Notifications
You must be signed in to change notification settings - Fork 11
Makefile changes Bugfix #42
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
base: main
Are you sure you want to change the base?
Conversation
…g able to build if /opt/NUSGet is not already done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a Makefile compilation error and adds an uninstall target. The original issue occurred when /opt/NUSGet didn't exist during installation, causing rm -rd to fail. The fix changes the flag to -rf, which forces deletion even if the directory doesn't exist.
Changes:
- Fixed
rm -rdtorm -rfin the install target to prevent errors when the directory doesn't exist - Added a new
uninstalltarget to remove installed files and directories
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| uninstall: | ||
| rm -rf /opt/NUSGet | ||
| rm /usr/share/applications/NUSGet.desktop |
Copilot
AI
Feb 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The uninstall target should use the -f flag with the rm command for consistency with line 17 and to prevent errors if the file doesn't exist. This follows the same reasoning as the fix applied to line 9.
| rm /usr/share/applications/NUSGet.desktop | |
| rm -f /usr/share/applications/NUSGet.desktop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you only uninstall an installed package, so the file is definetly there
| install ./packaging/NUSGet.desktop /usr/share/applications | ||
|
|
||
| uninstall: | ||
| rm -rf /opt/NUSGet |
Copilot
AI
Feb 1, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with line 9, consider adding a trailing slash to the directory path. While both forms work, consistent formatting improves maintainability.
| rm -rf /opt/NUSGet | |
| rm -rf /opt/NUSGet/ |
had an error when compiling that /opt/NUSGet cannot be found and therefore not be deleted. i fixed this by changing the
rm -rd /opt/NUSGetline torm -rf /opt/NUSGetsince -f forces the deletion even if the file or directory does not exist and -r already includes the functionality of -d.Furthermore i added an option to uninstall the program by running
sudo make uninstall