mirror of
https://gitee.com/spark-store-project/uos-packaging-tools
synced 2025-10-09 11:22:22 +08:00
1.7.6
Signed-off-by: shenmo <jifengshenmo@outlook.com>
This commit is contained in:
parent
c9837d0f89
commit
bd19756ff6
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,4 +1,4 @@
|
|||||||
uos-packaging-tools (1.7.5) UNRELEASED; urgency=low
|
uos-packaging-tools (1.7.6) UNRELEASED; urgency=low
|
||||||
|
|
||||||
* 支持在 Debian 13 安装
|
* 支持在 Debian 13 安装
|
||||||
* 根据新 zenity 的样式修改了大小
|
* 根据新 zenity 的样式修改了大小
|
||||||
|
@ -18,21 +18,10 @@ echo "正在检查权限: $opt"
|
|||||||
non_755_files=$(find "$opt" -type f -not -perm 755 -o -type d -not -perm 755 2>/dev/null | wc -l)
|
non_755_files=$(find "$opt" -type f -not -perm 755 -o -type d -not -perm 755 2>/dev/null | wc -l)
|
||||||
if [ $non_755_files -gt 0 ]; then
|
if [ $non_755_files -gt 0 ]; then
|
||||||
echo "发现$non_755_files个文件/目录权限不是755,正在修改..."
|
echo "发现$non_755_files个文件/目录权限不是755,正在修改..."
|
||||||
if sudo chmod 755 -R "$opt" 2>/tmp/chmod_error.log; then
|
if chmod 755 -R "$opt" 2>/tmp/chmod_error.log; then
|
||||||
echo "权限修改成功"
|
echo "权限修改成功"
|
||||||
else
|
else
|
||||||
error_msg=$(head -n 1 /tmp/chmod_error.log 2>/dev/null || echo "未知错误")
|
echo "权限修改失败"
|
||||||
notify-send "权限修改失败: $error_msg" -i /usr/share/icons/uos-packaging-tools.png
|
|
||||||
# 尝试使用pkexec作为备用方案
|
|
||||||
if command -v pkexec >/dev/null 2>&1; then
|
|
||||||
if pkexec chmod 755 -R "$opt"; then
|
|
||||||
echo "使用pkexec修改权限成功"
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "所有文件权限已经是755,无需修改"
|
echo "所有文件权限已经是755,无需修改"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user