fix: improve installation permissions handling and file extension checking
This commit is contained in:
+2
-1
@@ -12,7 +12,8 @@ cmake -S "$path/.." -B "$path/../build" \
|
||||
cmake --build "$path/../build" --config Release -- -j"$(nproc)"
|
||||
|
||||
if [ ! -w "$prefix" ] && [ "$(id -u)" -ne 0 ]; then
|
||||
sudo cmake --install "$path/../build" --config Release
|
||||
echo "Elevated permissions are required to install to $prefix, enter root's password to continue."
|
||||
su -m -c "cmake --install '$path/../build' --config Release" root
|
||||
else
|
||||
cmake --install "$path/../build" --config Release
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user