diff --git a/debian/changelog b/debian/changelog index fa05cd14..4c681a2a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +spark-store (4.2.7.2) stable; urgency=medium + + * 新增:内置在终端打开功能 + * 调整:散列验证更改为使用sha256 + + -- shenmo Sun, 5 Mar 2022 11:45:14 +0800 + + + spark-store (4.2.7.1) stable; urgency=medium * 修复:aptss加锁失败现在会正常报错 diff --git a/pkg/usr/share/applications/open-me-in-terminal.desktop b/pkg/usr/share/applications/open-me-in-terminal.desktop new file mode 100644 index 00000000..8502cbe5 --- /dev/null +++ b/pkg/usr/share/applications/open-me-in-terminal.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Categories=Development; +Encoding=UTF-8 +Exec=/opt/durapps/spark-store/bin/open-in-terminal/open-in-terminal %U +Icon=open-me-in-terminal +MimeType=application/x-desktop +Name=Open me in terminal +Name[zh_CN]=在终端中打开 +NoDisplay=true +StartupWMClass=在终端中打开 +Terminal=true +Type=Application diff --git a/pkg/usr/share/icons/hicolor/scalable/apps/open-me-in-terminal.png b/pkg/usr/share/icons/hicolor/scalable/apps/open-me-in-terminal.png new file mode 100644 index 00000000..993a76a0 Binary files /dev/null and b/pkg/usr/share/icons/hicolor/scalable/apps/open-me-in-terminal.png differ diff --git a/spark-store-project.pro b/spark-store-project.pro index 119364ec..8cd67ff3 100644 --- a/spark-store-project.pro +++ b/spark-store-project.pro @@ -41,16 +41,17 @@ qm.path = /usr/share/spark-store/translations bash_completion.files += pkg/usr/share/bash-completion/completions/aptss bash_completion.path = /usr/share/bash-completion/completions -desktop.files += pkg/usr/share/applications/spark-store.desktop +desktop.files += pkg/usr/share/applications/*.desktop desktop.path = /usr/share/applications service.files += pkg/usr/lib/systemd/system/spark-update-notifier.service service.path = /usr/lib/systemd/system/ -polkit-1.files +=pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade-worker.policy +polkit-1.files += pkg/usr/share/polkit-1/actions/store.spark-app.ss-do-upgrade-worker.policy polkit-1.path = /usr/share/polkit-1/actions/ -icon.files += pkg/usr/share/icons/hicolor/scalable/apps/spark-store.svg +icon.files += pkg/usr/share/icons/hicolor/scalable/apps/*.svg +icon.files += pkg/usr/share/icons/hicolor/scalable/apps/*.png icon.path = /usr/share/icons/hicolor/scalable/apps ssinstall-transhell.files += pkg/usr/share/ssinstall/transhell diff --git a/tool/open-in-terminal/open-in-terminal b/tool/open-in-terminal/open-in-terminal new file mode 100755 index 00000000..f723f72f --- /dev/null +++ b/tool/open-in-terminal/open-in-terminal @@ -0,0 +1,28 @@ +#!/bin/bash +source /opt/durapps/spark-store/bin/bashimport/transhell.amber +load_transhell +# 检查是否传入了路径参数 +if [ -z "$1" ]; then + echo "${TRANSHELL_CONTENT_PLEASE_PROVIDE_FILE_PATH}" + exit 1 +fi +DESKTOP_FILE_PATH=$1 +if [[ $DESKTOP_FILE_PATH == file://* ]]; then + # 如果是,移除 'file://' 部分并输出结果 + DESKTOP_FILE_PATH="${DESKTOP_FILE_PATH#file://}" +fi + +# 获取文件内容中Exec=后的命令 +exec_command=$(grep -oP "(?<=Exec=).*" "$DESKTOP_FILE_PATH") + +# 打印提取的命令 +echo "$exec_command" + +# 在默认终端执行命令 +eval "$exec_command" + +echo -------------------------------------- +echo "${TRANSHELL_CONTENT_ABOVE_IS_TERMINAL_OUTPUT}" +echo "${TRANSHELL_CONTENT_PRESS_ENTER_TO_FINISH}" +read + diff --git a/tool/open-in-terminal/transhell/open-in-terminal_en_US.transhell b/tool/open-in-terminal/transhell/open-in-terminal_en_US.transhell new file mode 100644 index 00000000..0950339f --- /dev/null +++ b/tool/open-in-terminal/transhell/open-in-terminal_en_US.transhell @@ -0,0 +1,5 @@ +#!/bin/bash +TRANSHELL_CONTENT_PLEASE_PROVIDE_FILE_PATH="Please provide a file path as an argument" +TRANSHELL_CONTENT_ABOVE_IS_TERMINAL_OUTPUT="The above is the output executed in the terminal. Please copy and paste it when providing feedback." +TRANSHELL_CONTENT_PRESS_ENTER_TO_FINISH="Press Enter to finish" + diff --git a/tool/open-in-terminal/transhell/open-in-terminal_zh_CN.transhell b/tool/open-in-terminal/transhell/open-in-terminal_zh_CN.transhell new file mode 100644 index 00000000..e1682c26 --- /dev/null +++ b/tool/open-in-terminal/transhell/open-in-terminal_zh_CN.transhell @@ -0,0 +1,5 @@ +#!/bin/bash +TRANSHELL_CONTENT_PLEASE_PROVIDE_FILE_PATH="请传入文件路径作为参数" +TRANSHELL_CONTENT_ABOVE_IS_TERMINAL_OUTPUT="以上是在终端中执行的输出,请在反馈问题的时候完整复制并贴上" +TRANSHELL_CONTENT_PRESS_ENTER_TO_FINISH="按回车结束" + diff --git a/tool/ssinstall b/tool/ssinstall index 500abe7a..590e0e9e 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -63,11 +63,13 @@ fi -echo "正在计算hash并与星火仓库匹配..." +echo "正在运行包验证..." +echo "Running Spark Package Verify..." -DEB_MD5SUM=`md5sum "$1" | cut -c -32` +DEB_SHA512SUM=$(sha512sum "$1" | cut -d ' ' -f 1) -IS_MD5SUM_CHECKD=`cat $PACKAGES_DATA_PATH | grep $DEB_MD5SUM` + +IS_SHA512SUM_CHECKD=`cat $PACKAGES_DATA_PATH | grep $DEB_SHA512SUM` } @@ -103,13 +105,13 @@ DEBPATH=`realpath $1` hash_check "$DEBPATH" -if [ -z "$IS_MD5SUM_CHECKD" ];then +if [ -z "$IS_SHA512SUM_CHECKD" ];then echo "尝试更新仓库信息重新校验" aptss ssupdate hash_check "$DEBPATH" fi -if [ ! -z "$IS_MD5SUM_CHECKD" ];then +if [ ! -z "$IS_SHA512SUM_CHECKD" ];then echo "校验成功,开始安装" echo ----------------------------------------------------------------------------------