summarylogtreecommitdiffstats
path: root/pixiv
blob: 3b943569eb7f89499761087e4d42831b6c419f7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
if ! test -f $HOME/.local/share/PixivUtil2/PixivUtil2.py;
then
  git clone https://github.com/Nandaka/PixivUtil2 $HOME/.local/share/PixivUtil2
  chmod +x $HOME/.local/share/PixivUtil2/PixivUtil2.py
  # cd $HOME/.local/share/PixivUtil2/
  python3 -m venv $HOME/.local/share/PixivUtil2/pixiv_venv
  source $HOME/.local/share/PixivUtil2/pixiv_venv/bin/activate
  pip install -r $HOME/.local/share/PixivUtil2/requirements.txt
  echo -e "\e[0;35mIf you cannot sign in, go to the instructions here: https://github.com/Nandaka/PixivUtil2#a-usage (Q3)\033[0m"
  echo -e "\e[0;35mNOTE: The config.ini file is located at: $HOME/.local/share/PixivUtil2/config.ini\033[0m"
  $HOME/.local/share/PixivUtil2/PixivUtil2.py $@
  echo -e "\e[0;35mIf you cannot sign in, go to the instructions here: https://github.com/Nandaka/PixivUtil2#a-usage (Q3)\033[0m"
  echo -e "\e[0;35mNOTE: The config.ini file is located at: $HOME/.local/share/PixivUtil2/config.ini\033[0m"
else
  # cd $HOME/.local/share/PixivUtil2/
  export ogdir="`pwd`"
  cd $HOME/.local/share/PixivUtil2/
  git pull -q
  cd $ogdir
  source $HOME/.local/share/PixivUtil2/pixiv_venv/bin/activate
  $HOME/.local/share/PixivUtil2/PixivUtil2.py $@
fi