A rewrite in C++ and wxWidgets of a minimalistic pEp Linux Setup for Thuderbird.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

72 lines
1.6 KiB

#!/bin/bash
setup_base=
mda_ver=2.0.0
mda_variant=tb
mda_plat=x86_64
mda_os=lnx
mda_tgz=
user_inst=0
xdg_script=
while getopts hub:P:O:X:V:Z: opt ; do
case $opt in
\?|h) echo "Usage: $0: [-u] [-b <setup_base>] [-P <mda_plat>] [-O <mda_OS>] [-V <mda_ver>] [<xdg_file>]" ; exit 0 ;;
u) user_inst=1 ;;
b) setup_base=$OPTARG/ ;;
P) mda_plat=$OPTARG ;;
O) mda_os=$OPTARG ;;
X) mda_variant=$OPTARG ;;
V) mda_ver=$OPTARG ;;
Z) mda_tgz=$OPTARG ;;
esac
done
shift $(($OPTIND - 1))
xdg_script=$1
if [ -z "$setup_base" ] ; then
setup_base=$(cd "$(dirname "$0")" ; echo $PWD)/
fi
if [ -z "$mda_tgz" ] ; then
mda_tgz="${setup_base}pepmda-${mda_variant}-${mda_os}+${mda_ver}-${mda_plat}.tgz"
fi
H="asrootbin: "
echo "${H}# Command: $0 $@"
echo "${H}# UID=$(id -u)"
echo "${H}TITLE_1" >&2
echo "${H}user_inst: $user_inst" >&2
echo "${H}setup_base: $setup_base" >&2
echo "${H}xdg_script: $xdg_script" >&2
echo "${H}ver: $mda_ver" >&2
echo "${H}plat: $mda_plat" >&2
echo "${H}os: $mda_os" >&2
echo "${H}zip: $mda_zip" >&2
echo "${H}TITLE_2" >&2
sleep .2
if [ $(id -u) -ne 0 ] ; then
case $1 in
--system)
for retry in 0 1 2 3 4 5 ; do
[ $retry -ne 5 ] || { echo "Too many retries" >&2 ; exit 1 ; }
echo "PEP_SUDO_PASSWORD_PROMPT: " >&2
read -s PW
echo "${H}Password was ${PW}" >&2
case $PW in
abcd) break ;;
esac
echo "${H}Wrong password" >&2
done
;;
esac
fi
for X in 3 4 5 6 7; do
echo "${H}TITLE_$X" >&2
echo "${H}$X"
sleep .2
done
exit ${PEP_TESTRET}