added license acceptance when installing the graphical user interface #38
30
winehelper
30
winehelper
@@ -336,9 +336,25 @@ check_file_sum () {
|
||||
}
|
||||
|
||||
print_license_agreement() {
|
||||
if [[ -f "$license_agreement_file" ]] \
|
||||
&& [[ "$(stat -c %a "$license_agreement_file" 2>/dev/null)" == "600" ]]
|
||||
then return 0
|
||||
if [[ -f "$license_agreement_file" ]] &&
|
||||
[[ "$(stat -c %a "$license_agreement_file" 2>/dev/null)" == "600" ]] ; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
setup_agreement() {
|
||||
touch "$license_agreement_file"
|
||||
chmod 600 "$license_agreement_file"
|
||||
|
||||
cleanup_laf() {
|
||||
local cleanup_laf_dir="$(dirname "$license_agreement_file")"
|
||||
rm -r "$cleanup_laf_dir" || echo "Не удалось удалить каталог $cleanup_laf_dir"
|
||||
}
|
||||
trap "cleanup_laf" EXIT
|
||||
}
|
||||
|
||||
if [[ -n "$GUI_MODE" ]] ; then
|
||||
setup_agreement
|
||||
return 0
|
||||
fi
|
||||
|
||||
echo
|
||||
@@ -356,13 +372,7 @@ print_license_agreement () {
|
||||
"
|
||||
|
||||
if print_confirmation "Подтвердите продолжение установки" ; then
|
||||
touch "$license_agreement_file"
|
||||
chmod 600 "$license_agreement_file"
|
||||
cleanup_laf () {
|
||||
local cleanup_laf_dir="$(dirname "$license_agreement_file")"
|
||||
rm -r "$cleanup_laf_dir" || echo "Не удалось удалить каталог $cleanup_laf_dir"
|
||||
}
|
||||
trap "cleanup_laf" EXIT
|
||||
setup_agreement
|
||||
return 0
|
||||
else
|
||||
exit 1
|
||||
|
Reference in New Issue
Block a user