mirror of
https://gitee.com/spark-store-project/additional-base-lib
synced 2025-12-18 13:01:42 +08:00
59 lines
1.5 KiB
Bash
Executable File
59 lines
1.5 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [ -x "/opt/durapps/transhell/transhell.sh" ]
|
|
then
|
|
source /opt/durapps/transhell/transhell.sh
|
|
load_transhell
|
|
else
|
|
source /usr/share/ablrun/transhell/ablrun_en_US.transhell
|
|
source /usr/share/ablrun/transhell/ablrun_${LANG}.transhell
|
|
fi
|
|
|
|
if [ "$*" = "" ]
|
|
then
|
|
echo
|
|
echo " All the library files, which packed with additional-base-lib,"
|
|
echo " are taken from one GNU/Linux distribution. You may found information"
|
|
echo " in package control files. The scripts theirselves were created by"
|
|
echo " CongTianKong <https://gitee.com/CongTianKong>. There's no lisence"
|
|
echo " nor copyright restriction with The script. Feel free to deal with."
|
|
echo
|
|
|
|
echo -e "${TRANSHELL_CONTENT_USAGE}"
|
|
echo -e "${TRANSHELL_CONTENT_ADDITIONAL_BASE_LIB_INFO}"
|
|
echo
|
|
echo -e "${TRANSHELL_CONTENT_SCRIPT_AUTO_DETECT}"
|
|
echo -e "${TRANSHELL_CONTENT_APPIMAGE_INFO}"
|
|
echo -e "${TRANSHELL_CONTENT_NORMAL_EXECUTABLE_INFO}"
|
|
exit
|
|
fi
|
|
|
|
if [ `whoami` = "root" ]
|
|
then
|
|
exec ablrun-normal "$@"
|
|
fi
|
|
|
|
if [ -e "$1" ]
|
|
then
|
|
ABL_FILENAME="$1"
|
|
else
|
|
ABL_FILENAME=`which $1`
|
|
if [ "$?" != "0" ]
|
|
then
|
|
echo -e "${TRANSHELL_CONTENT_FILE_NOT_EXISTS}"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
ABL_FILETYPE=`xdg-mime query filetype "$ABL_FILENAME"`
|
|
if [ "$ABL_FILETYPE" != "application/vnd.appimage" ]
|
|
then
|
|
if [ "$ABL_FILETYPE" != "application/x-iso9660-appimage" ]
|
|
then
|
|
exec ablrun-normal "$@"
|
|
fi
|
|
fi
|
|
|
|
exec ablrun-appimage "$@"
|
|
|