Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distro specific lines, safety for beginners #682

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 80 additions & 3 deletions build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,90 @@

VERSION=$(cat share/torbrowser-launcher/version)

build_rpm(){

# clean up from last build
rm -r build dist

# build binary package
python3 setup.py bdist_rpm --requires="python3-qt5, python3-gpg, python3-requests, python3-pysocks, python3-packaging, gnupg2"

# install it
}

# safety for beginners, blackPanther OS users
if [ -f "/etc/blackPanther-release" ];then

case "$LANG" in
hu*)
no_text='\tMegszakítva!\n\n Amennyiben telepíteni akarod a hivatalos csaomagot, használd az alábbi műveletet:\n\n\ttelepites tor-browser-launcher'
echo ''
echo ' Egyéni TOR csomag létrehozása ...'
echo ' A TOR hivatalos csomag elérhető a rendszer tárolójában is, elképzelhető, hogy az általad létrehozott csomag'
echo ' helytelen függőségeket tartalmazhat, vagy működési hibát okozhat.'
accept=" Ennek ellenére biztosan létrehozod a saját csomagod? i=igen n=nem (i/n)"
;;
*)
no_text='\tCancelled!\n\n If you want to install the official package, use the following procedure:\n\n\tinstalling tor-browser-launcher'
echo ''
echo ' Creating a custom TOR package...'
echo ' The official TOR package is also available in the system repository,'
echo ' it is possible that it is the package you created it may contain '
echo ' incorrect dependencies or cause a malfunction.'
accept=" Still, are you sure you'll create your own package? y=yes n=no (y/n)"
;;
esac

echo ""
ANSWER=""
while [ -z "${ANSWER}" ] ; do
echo -en "$accept : "
read ANSWER
UCANSWER=`echo "${ANSWER}" | tr '[a-z]' '[A-Z]'`
case "${UCANSWER}" in
"I"|"YES"|"Y")
;;
"NO"|"N")
echo ""
echo -e "$no_text"
echo ""
exit 1
;;
*)
ANSWER=""
;;
esac
done

build_rpm

echo ""
echo "To install, run:"
echo "sudo dnf install dist/torbrowser-launcher-$VERSION-1.noarch.rpm"
case $LANG in
hu*)
if [ -f "dist/torbrowser-launcher-$VERSION-1.noarch.rpm" ];then
echo "A telepítéshez használd:"
echo "telepites dist/torbrowser-launcher-$VERSION-1.noarch.rpm"
else
echo " Hiányzó csomag! Lehet, hogy a saját RPM létrehozása nem sikerült..."
fi
;;
*)
if [ -f "dist/torbrowser-launcher-$VERSION-1.noarch.rpm" ];then
echo " To install, run:"
echo " installing dist/torbrowser-launcher-$VERSION-1.noarch.rpm"
else
echo " Missing package! The own RPM creation may failed..."
fi
;;
esac
echo ""
exit 0
fi

build_rpm
echo ""
echo " To install, run:"
echo " sudo dnf install dist/torbrowser-launcher-$VERSION-1.noarch.rpm"
echo ""