Проверка root и поддержка ccache

master 0.2.4
parent 83368969b6
commit 2c478b94d2

@ -13,8 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
PATH=/lib/rc/bin:$PATH
TEXTDOMAIN=cl_kernel
CL_KERNEL_VERSION=0.2.1
DESCRIPTION=$"Kernel building tool"
@ -48,6 +46,23 @@ CHMOD=0644
DRACUT=$(which dracut 2>/dev/null)
declare -a TAILOUT=()
# поддержка настроек ccache
# support ccache
source <(cat /etc/portage/make.conf/* | grep CCACHE_DIR)
export CCACHE_DIR
if [[ -n $CCACHE_DIR ]]
then
export PATH="/usr/lib/ccache/bin:/lib/rc/bin:$PATH"
fi
# проверить пользователя
# check user
if [[ $(id -u) -ne 0 ]]
then
eerror $"This program must be run as root"
exit 1
fi
# прервать скрипт в случае ошибки любой из команд
# break the script execution in case of a command error
set -e

@ -184,3 +184,7 @@ msgstr ""
#: ../cl-kernel:709
msgid "All done!"
msgstr ""
#: ../cl-kernel:709
msgid "This program must be run as root"
msgstr ""

@ -227,3 +227,7 @@ msgstr "Все готово!"
#~ msgid "Failed to import make.conf"
#~ msgstr "Не удалось импортировать make.conf"
#: ../cl-kernel:709
msgid "This program must be run as root"
msgstr "Это программа должна быть запущена от пользователя root"

Loading…
Cancel
Save