2014-06-10 17:41:13 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
|
|
echo "You need to run this as root" 1>&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2014-06-11 15:53:00 -04:00
|
|
|
PERSISTENT=/home/amnesia/Persistent
|
|
|
|
INSTALL_DIR=$PERSISTENT/.onionshare_install
|
|
|
|
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
|
|
|
|
|
|
|
|
cd $ROOT
|
|
|
|
rm -rf $INSTALL_DIR &>/dev/null 2>&1
|
|
|
|
mkdir -p $INSTALL_DIR
|
2014-06-10 17:41:13 -04:00
|
|
|
|
|
|
|
# install dependencies
|
|
|
|
apt-get update
|
2014-06-20 17:06:44 -04:00
|
|
|
apt-get install -y build-essential fakeroot python-all python-stdeb python-flask python-stem python-qt4
|
2014-06-10 17:41:13 -04:00
|
|
|
./build_deb.sh
|
|
|
|
|
2014-06-11 15:53:00 -04:00
|
|
|
# copy files
|
|
|
|
cp deb_dist/onionshare_*.deb $INSTALL_DIR
|
|
|
|
cp /var/cache/apt/archives/libjs-jquery_*.deb $INSTALL_DIR
|
|
|
|
cp /var/cache/apt/archives/python-flask_*.deb $INSTALL_DIR
|
|
|
|
cp /var/cache/apt/archives/python-jinja2_*.deb $INSTALL_DIR
|
|
|
|
cp /var/cache/apt/archives/python-markupsafe_*.deb $INSTALL_DIR
|
|
|
|
cp /var/cache/apt/archives/python-stem_*.deb $INSTALL_DIR
|
|
|
|
cp /var/cache/apt/archives/python-werkzeug_*.deb $INSTALL_DIR
|
|
|
|
cp setup/onionshare80.xpm $INSTALL_DIR
|
|
|
|
cp tails/install.sh $INSTALL_DIR
|
2014-06-20 17:06:44 -04:00
|
|
|
cp tails/onionshare-install.desktop $PERSISTENT
|
2014-06-10 17:41:13 -04:00
|
|
|
|
2014-06-10 18:25:09 -04:00
|
|
|
# fix permissions
|
2014-06-11 15:53:00 -04:00
|
|
|
chown -R amnesia:amnesia deb_dist $INSTALL_DIR
|
2014-06-20 17:06:44 -04:00
|
|
|
chown amnesia:amnesia $PERSISTENT/onionshare-install.desktop
|
|
|
|
chmod 700 $PERSISTENT/onionshare-install.desktop
|