1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-13 00:25:14 +00:00
This commit is contained in:
Tw93
2025-11-25 17:25:13 +08:00
parent 2830eb69ca
commit e517bf4a3e
16 changed files with 331 additions and 326 deletions

View File

@@ -5,13 +5,13 @@
check_touchid_sudo() {
# Check if Touch ID is configured for sudo
local pam_file="/etc/pam.d/sudo"
if [[ -f "$pam_file" ]] && grep -q "pam_tid.so" "$pam_file" 2>/dev/null; then
if [[ -f "$pam_file" ]] && grep -q "pam_tid.so" "$pam_file" 2> /dev/null; then
echo -e " ${GREEN}${NC} Touch ID Enabled for sudo"
else
# Check if Touch ID is supported
local is_supported=false
if command -v bioutil > /dev/null 2>&1; then
if bioutil -r 2>/dev/null | grep -q "Touch ID"; then
if bioutil -r 2> /dev/null | grep -q "Touch ID"; then
is_supported=true
fi
elif [[ "$(uname -m)" == "arm64" ]]; then
@@ -40,8 +40,8 @@ check_rosetta() {
check_git_config() {
# Check basic Git configuration
if command -v git > /dev/null 2>&1; then
local git_name=$(git config --global user.name 2>/dev/null || echo "")
local git_email=$(git config --global user.email 2>/dev/null || echo "")
local git_name=$(git config --global user.name 2> /dev/null || echo "")
local git_email=$(git config --global user.email 2> /dev/null || echo "")
if [[ -n "$git_name" && -n "$git_email" ]]; then
echo -e " ${GREEN}${NC} Git Config Configured"