@@ -20,13 +20,13 @@ checkAURHelper() {
20
20
for helper in ${AUR_HELPERS} ; do
21
21
if command_exists " ${helper} " ; then
22
22
AUR_HELPER=${helper}
23
- echo " Using ${helper} as AUR helper"
23
+ printf " Using ${helper} as AUR helper"
24
24
AUR_HELPER_CHECKED=true
25
25
return 0
26
26
fi
27
27
done
28
28
29
- echo " Installing yay as AUR helper..."
29
+ printf " %b\n " " ${YELLOW} Installing yay as AUR helper...${RC} "
30
30
" $ESCALATION_TOOL " " $PACKAGER " -S --needed --noconfirm base-devel
31
31
cd /opt && " $ESCALATION_TOOL " git clone https://aur.archlinux.org/yay-bin.git && " $ESCALATION_TOOL " chown -R " $USER " :" $USER " ./yay-bin
32
32
cd yay-bin && makepkg --noconfirm -si
@@ -49,7 +49,7 @@ checkEscalationTool() {
49
49
for tool in ${ESCALATION_TOOLS} ; do
50
50
if command_exists " ${tool} " ; then
51
51
ESCALATION_TOOL=${tool}
52
- echo " Using ${tool} for privilege escalation"
52
+ printf " Using ${tool} for privilege escalation"
53
53
ESCALATION_TOOL_CHECKED=true
54
54
return 0
55
55
fi
@@ -65,7 +65,7 @@ checkCommandRequirements() {
65
65
REQUIREMENTS=$1
66
66
for req in ${REQUIREMENTS} ; do
67
67
if ! command_exists " ${req} " ; then
68
- echo " ${RED} To run me, you need: ${REQUIREMENTS}${RC} "
68
+ printf " %b\n " " ${RED} To run me, you need: ${REQUIREMENTS}${RC} "
69
69
exit 1
70
70
fi
71
71
done
@@ -77,7 +77,7 @@ checkPackageManager() {
77
77
for pgm in ${PACKAGEMANAGER} ; do
78
78
if command_exists " ${pgm} " ; then
79
79
PACKAGER=${pgm}
80
- echo " Using ${pgm} "
80
+ printf " Using ${pgm} "
81
81
break
82
82
fi
83
83
done
@@ -94,14 +94,14 @@ checkSuperUser() {
94
94
for sug in ${SUPERUSERGROUP} ; do
95
95
if groups | grep -q " ${sug} " ; then
96
96
SUGROUP=${sug}
97
- echo " Super user group ${SUGROUP} "
97
+ printf " Super user group ${SUGROUP} "
98
98
break
99
99
fi
100
100
done
101
101
102
102
# # Check if member of the sudo group.
103
103
if ! groups | grep -q " ${SUGROUP} " ; then
104
- echo " ${RED} You need to be a member of the sudo group to run me!${RC} "
104
+ printf " %b\n " " ${RED} You need to be a member of the sudo group to run me!${RC} "
105
105
exit 1
106
106
fi
107
107
}
@@ -110,7 +110,7 @@ checkCurrentDirectoryWritable() {
110
110
# # Check if the current directory is writable.
111
111
GITPATH=" $( dirname " $( realpath " $0 " ) " ) "
112
112
if [ ! -w " $GITPATH " ]; then
113
- echo " ${RED} Can't write to $GITPATH ${RC} "
113
+ printf " %b\n " " ${RED} Can't write to $GITPATH ${RC} "
114
114
exit 1
115
115
fi
116
116
}
0 commit comments