(MOD) Added a feature where it displays the current user identity once it's not root.

This commit is contained in:
2024-06-25 14:50:37 +08:00
parent 55d9ddef39
commit 5026f03692
2 changed files with 7 additions and 6 deletions

View File

@@ -1,5 +1,10 @@
#!/bin/sh
if [ "$(whoami)" != "root" ]; then
echo "The script require root privilege to execute properly. Current identity: $(whoami)"
exit 1
fi
# Install Compound library.
echo "Installing libcompound:"
cp -v "libcompound.so" "/usr/lib"

View File

@@ -1,14 +1,10 @@
#!/bin/sh
if [ "`whoami`" != "root" ]; then
echo "The script require root privilege to execute properly."
if [ "$(whoami)" != "root" ]; then
echo "The script require root privilege to execute properly. Current identity: $(whoami)"
exit 1
fi
# echo "Please ensure the current work directory is the home directory to the project Compound!
# Press enter key to continue..."
# read
SRC="$PWD"
DST=/usr/include/Compound
PROJ=("Array" "Paper" "Pen" "Render" "Status" "Var" "MemMan" "Stack" "Utils"\