-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall
More file actions
executable file
·49 lines (43 loc) · 1.51 KB
/
install
File metadata and controls
executable file
·49 lines (43 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
# personal setup script
set -o pipefail
BASE_DIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
cd "${BASE_DIR}" || exit 1
# deps I use from upstream, might as well install them here
upstream_module_dependencies() {
hpi_module my.location.gpslogger || return $?
hpi_module my.google.takeout.parser || return $?
hpi_module my.github.ghexport || return $?
hpi_module my.stackexchange.stexport || return $?
hpi_module my.browser.export || return $?
hpi_module my.reddit.pushshift || return $?
hpi_module my.reddit.rexport || return $?
hpi_module my.smscalls || return $?
hpi_module my.coding.commits || return $?
# only install these if numpy is already installed
pip list --format=freeze | cut -d= -f1 | grep -ix numpy && {
hpi_module my.time.tz.via_location || return $?
hpi_module my.pdfs || return $?
}
}
module_deps() {
upstream_module_dependencies || return $?
pip_install 'git+https://github.com/karlicoss/arctee' || return $?
pip_install 'git+https://github.com/purarue/plaintext_playlist_py' || return $?
hpi_module my.old_forums || return $?
}
pmain() {
pip_install -e . || return $?
module_deps || prompt_if_fails || return $?
# make sure personal editable packages are importable
python3 -c 'import nextalbums' || prompt_if_fails || return $?
}
declare MY_MODULES
MY_MODULES="$(realpath ../HPI)"
if [[ ! -e "${MY_MODULES}" ]]; then
echo "My Modules doesn't exist '${MY_MODULES}'" 1>&2
exit 1
fi
# shellcheck source=../HPI/install
source "${MY_MODULES}/install"
pmain "$@" || exit $?