Move install to post-install command

This commit is contained in:
Rico Tiongson 2019-03-02 19:17:10 +08:00
parent b097123884
commit de98f3a982
2 changed files with 32 additions and 28 deletions

View File

@ -5,10 +5,10 @@ Comfortable, seamless, and fast 3-finger (and 4-finger) touchpad swipe gestures
## Installation ## Installation
1. Install git, libinput, and g++ 1. Install Python3, libinput, and g++
```bash ```bash
sudo apt-get install git libinput-tools libxdo-dev g++ sudo apt-get install git python3-dev libinput-tools libxdo-dev
``` ```
2. Clone this repository 2. Clone this repository

View File

@ -81,8 +81,12 @@ try:
# include program to sources so it will be removed on uninstall # include program to sources so it will be removed on uninstall
) )
# create directories if they don't exist yet class Install(install):
if 'install' in sys.argv: def run(self):
# perform original run command
install.run(self)
# create program/config directories
os.path.exists(os.path.dirname(PROGRAM)) or os.makedirs(os.path.dirname(PROGRAM)) os.path.exists(os.path.dirname(PROGRAM)) or os.makedirs(os.path.dirname(PROGRAM))
os.path.exists(os.path.dirname(CONFIG)) or os.makedirs(os.path.dirname(CONFIG)) os.path.exists(os.path.dirname(CONFIG)) or os.makedirs(os.path.dirname(CONFIG))