mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-26 07:49:48 -05:00
37 lines
1.2 KiB
Bash
Executable File
37 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "You need to run this as root" 1>&2
|
|
exit 1
|
|
fi
|
|
|
|
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
|
|
|
|
# install dependencies
|
|
apt-get update
|
|
apt-get install -y build-essential fakeroot python-all python-stdeb python-flask python-stem python-webkit
|
|
./build_deb.sh
|
|
|
|
# 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
|
|
cp tails/Install\ OnionShare.desktop $PERSISTENT
|
|
|
|
# fix permissions
|
|
chown -R amnesia:amnesia deb_dist $INSTALL_DIR
|
|
chown amnesia:amnesia $PERSISTENT/Install\ OnionShare.desktop
|
|
chmod 700 $PERSISTENT/Install\ OnionShare.desktop
|