summarylogtreecommitdiffstats
path: root/patch.sh
blob: cc3d31177a2ff2319a1dd86852d056fcd2f5071f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env bash

basedir="$1"

# Fix imports secondary.py
sed -i '/from ntpath import normpath/d' "$basedir/secondary.py"
sed -i 's/from os.path import join, basename, splitext, isfile, abspath/from os.path import join, basename, splitext, isfile, abspath, normpath/' "$basedir/secondary.py"

# Fix imports main.py
sed -i '/from ntpath import normpath/d' "$basedir/main.py"
sed -i 's/from os.path import (isdir, isfile, join, basename, splitext, dirname, split, getmtime,/from os.path import isdir, isfile, join, basename, splitext, dirname, split, getmtime, abspath, splitdrive, normpath/' "$basedir/main.py"
sed -i '/                     abspath, splitdrive)/d' "$basedir/main.py"