mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-24 22:14:28 +00:00
remove unwanted code
This commit is contained in:
parent
f03aaa72f6
commit
6e6286211a
|
@ -14,52 +14,6 @@ checkEnv() {
|
||||||
checkPackageManager 'apt-get dnf pacman zypper nix-env'
|
checkPackageManager 'apt-get dnf pacman zypper nix-env'
|
||||||
checkSuperUser
|
checkSuperUser
|
||||||
checkDistro
|
checkDistro
|
||||||
## Check for requirements.
|
|
||||||
REQUIREMENTS='curl groups sudo'
|
|
||||||
for req in ${REQUIREMENTS}; do
|
|
||||||
if ! command_exists ${req}; then
|
|
||||||
echo -e "${RED}To run me, you need: ${REQUIREMENTS}${RC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
## Check Package Handler
|
|
||||||
PACKAGEMANAGER='apt-get dnf pacman zypper nix-env'
|
|
||||||
for pgm in ${PACKAGEMANAGER}; do
|
|
||||||
if command_exists ${pgm}; then
|
|
||||||
PACKAGER=${pgm}
|
|
||||||
echo "Using ${pgm}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "${PACKAGER}" ]; then
|
|
||||||
echo -e "${RED}Can't find a supported package manager${RC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
## Check SuperUser Group
|
|
||||||
SUPERUSERGROUP='wheel sudo root'
|
|
||||||
for sug in ${SUPERUSERGROUP}; do
|
|
||||||
if groups | grep -q ${sug}; then
|
|
||||||
SUGROUP=${sug}
|
|
||||||
echo "Super user group ${SUGROUP}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
## Check if member of the sudo group.
|
|
||||||
if ! groups | grep -q ${SUGROUP}; then
|
|
||||||
echo -e "${RED}You need to be a member of the sudo group to run me!${RC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
DTYPE="unknown" # Default to unknown
|
|
||||||
# Use /etc/os-release for modern distro identification
|
|
||||||
if [ -f /etc/os-release ]; then
|
|
||||||
. /etc/os-release
|
|
||||||
DTYPE=$ID
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setupAlacritty() {
|
setupAlacritty() {
|
||||||
|
|
|
@ -14,52 +14,6 @@ checkEnv() {
|
||||||
checkPackageManager 'apt-get dnf pacman zypper nix-env'
|
checkPackageManager 'apt-get dnf pacman zypper nix-env'
|
||||||
checkSuperUser
|
checkSuperUser
|
||||||
checkDistro
|
checkDistro
|
||||||
## Check for requirements.
|
|
||||||
REQUIREMENTS='curl groups sudo'
|
|
||||||
for req in ${REQUIREMENTS}; do
|
|
||||||
if ! command_exists ${req}; then
|
|
||||||
echo -e "${RED}To run me, you need: ${REQUIREMENTS}${RC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
## Check Package Handler
|
|
||||||
PACKAGEMANAGER='apt-get dnf pacman zypper nix-env'
|
|
||||||
for pgm in ${PACKAGEMANAGER}; do
|
|
||||||
if command_exists ${pgm}; then
|
|
||||||
PACKAGER=${pgm}
|
|
||||||
echo "Using ${pgm}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "${PACKAGER}" ]; then
|
|
||||||
echo -e "${RED}Can't find a supported package manager${RC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
## Check SuperUser Group
|
|
||||||
SUPERUSERGROUP='wheel sudo root'
|
|
||||||
for sug in ${SUPERUSERGROUP}; do
|
|
||||||
if groups | grep -q ${sug}; then
|
|
||||||
SUGROUP=${sug}
|
|
||||||
echo "Super user group ${SUGROUP}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
## Check if member of the sudo group.
|
|
||||||
if ! groups | grep -q ${SUGROUP}; then
|
|
||||||
echo -e "${RED}You need to be a member of the sudo group to run me!${RC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
DTYPE="unknown" # Default to unknown
|
|
||||||
# Use /etc/os-release for modern distro identification
|
|
||||||
if [ -f /etc/os-release ]; then
|
|
||||||
. /etc/os-release
|
|
||||||
DTYPE=$ID
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setupKitty() {
|
setupKitty() {
|
||||||
|
|
|
@ -14,52 +14,6 @@ checkEnv() {
|
||||||
checkPackageManager 'apt-get dnf pacman zypper nix-env'
|
checkPackageManager 'apt-get dnf pacman zypper nix-env'
|
||||||
checkSuperUser
|
checkSuperUser
|
||||||
checkDistro
|
checkDistro
|
||||||
## Check for requirements.
|
|
||||||
REQUIREMENTS='curl groups sudo'
|
|
||||||
for req in $REQUIREMENTS; do
|
|
||||||
if ! command_exists "$req"; then
|
|
||||||
echo -e "${RED}To run me, you need: ${REQUIREMENTS}${RC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
## Check Package Handler
|
|
||||||
PACKAGEMANAGER='apt-get dnf pacman zypper nix-env'
|
|
||||||
for pgm in $PACKAGEMANAGER; do
|
|
||||||
if command_exists "$pgm"; then
|
|
||||||
PACKAGER="$pgm"
|
|
||||||
echo "Using $pgm"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ -z "$PACKAGER" ]; then
|
|
||||||
echo -e "${RED}Can't find a supported package manager${RC}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
## Check SuperUser Group
|
|
||||||
SUPERUSERGROUP='wheel sudo root'
|
|
||||||
for sug in $SUPERUSERGROUP; do
|
|
||||||
if groups | grep -q "$sug"; then
|
|
||||||
SUGROUP="$sug"
|
|
||||||
echo "Super user group $SUGROUP"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
## Check if member of the sudo group.
|
|
||||||
if ! groups | grep -q "$SUGROUP"; then
|
|
||||||
echo -e "${RED}You need to be a member of the sudo group to run me!${RC}\n"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
DTYPE="unknown" # Default to unknown
|
|
||||||
# Use /etc/os-release for modern distro identification
|
|
||||||
if [ -f /etc/os-release ]; then
|
|
||||||
. /etc/os-release
|
|
||||||
DTYPE="$ID"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setupRofi() {
|
setupRofi() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user