dotfiles

config files and scripts at HOME.
git clone git://git.ricketyspace.net/dotfiles.git
Log | Files | Refs

commit 27dc1b9b65e98b5ad78b1728373a38f3ccaf6e4d
parent 8587a0c6db8b82117e056bdd108ea05856f3e0a3
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat, 24 Feb 2018 02:13:24 +0000

.bin: Remove anki.

Diffstat:
.bin/anki | 71-----------------------------------------------------------------------
1 file changed, 0 insertions(+), 71 deletions(-)

diff --git a/.bin/anki b/.bin/anki @@ -1,71 +0,0 @@ -#!/bin/sh -# -# Copyright © 2017 rsiddharth <s@ricketyspace.net> -# License: GNU General Public License version 3 or higher. -# -# systemd-nspawn container for anki - -CONTAINER_DIR=$HOME'/.containers' -CONTAINER_NAME='anki' -CONTAINER=$CONTAINER_DIR'/'$CONTAINER_NAME -SCRIPT=`which "$0"` - -TERMINFO_SRC='/usr/share/terminfo/r/rxvt-256color:' -TERMINFO_BIND=$TERMINFO_SRC'/root/.terminfo/r/rxvt-256color' - -ANKI_DIR='/home/s/anki' - -if [ "$1" = "bootstrap" ]; then - echo 'debootstraping' - mkdir -p $CONTAINER_DIR - sudo debootstrap --arch=amd64 testing $CONTAINER - echo 'starting container' - sudo systemd-nspawn -D $CONTAINER \ - --bind-ro=$SCRIPT:/root/$SCRIPT \ - /root/$SCRIPT install -elif [ "$1" = "install" ]; then - echo 'installing paraphernalia in container' - apt-get update -y - apt-get install -y git python3-pip python3-pyqt5 \ - python3-pyqt5.qtwebengine pyqt5-dev-tools \ - portaudio19-dev mplayer lame sudo texlive \ - dvipng - id -u s 2>&1 /dev/null || adduser --disabled-login --gecos "" s - [ -d $ANKI_DIR ] || git clone git://github.com/dae/anki.git \ - $ANKI_DIR&& cd $ANKI_DIR - pip3 install -r requirements.txt - ./tools/build_ui.sh - chown -R s:s $ANKI_DIR -elif [ "$1" = "start-container" ]; then - echo 'starting container' - xhost +local: - sudo systemd-nspawn --setenv=DISPLAY=:0.0 \ - -D $CONTAINER \ - --setenv=XAUTHORITY=~/.Xauthority \ - --bind=/tmp/ \ - --bind=/home/s/.Xauthority:/root/.Xauthority \ - --bind-ro=$SCRIPT:/root/$SCRIPT \ - --bind-ro=$TERMINFO_BIND -elif [ "$1" = "start-anki" ]; then - echo 'starting anki in container' - xhost +local: - sudo systemd-nspawn --setenv=DISPLAY=:0.0 \ - -D $CONTAINER \ - --setenv=XAUTHORITY=~/.Xauthority \ - --bind=/tmp/ \ - --bind=/home/s/.Xauthority:/root/.Xauthority \ - --bind-ro=$SCRIPT:/root/$SCRIPT \ - /root/$SCRIPT run-anki - annex-anki -elif [ "$1" = "run-anki" ]; then - echo 'updating container' - apt-get update -y - apt-get upgrade -y - echo 'starting anki...' - cd $ANKI_DIR - sudo -H -u s ./runanki - cp -f /home/s/collection.apkg /tmp/ -else - echo 'Dunno what to do' - exit 1 -fi