summarylogtreecommitdiffstats
path: root/bootstrap.sh
diff options
context:
space:
mode:
authorskydrome2019-11-18 23:36:01 -0500
committerskydrome2019-11-18 23:36:01 -0500
commitdbb8733213fb0ad8cec13b6666032c7420be5a17 (patch)
treef59136e38fadb423475e9e61e07e9c2672643640 /bootstrap.sh
parentae9e8b1eec4f2025fa83dbece4870b2f7aae54dd (diff)
downloadaur-dbb8733213fb0ad8cec13b6666032c7420be5a17.tar.gz
add bootstrap script and bash completion
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
new file mode 100755
index 000000000000..1e39da80e3a8
--- /dev/null
+++ b/bootstrap.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+_install() {
+ echo -e "\n>>> Creating rtorrent folder tree..."
+ mkdir -vp $HOME/.rtorrent/{downloads,session,logs,watch}
+ mkdir -p bin .local
+
+ echo -en "\n>>> Checking PATH... "
+ [[ $PATH =~ "$HOME/bin:" ]] &&
+ echo "ok" || { echo "add ~/bin to your PATH"; export PATH="$PATH:$HOME/bin"; }
+
+ echo -e "\n>>> Installing pyroscope tools..."
+ git clone -q https://github.com/pyroscope/pyrocore.git .local/pyroscope ||exit 1
+ ~/.local/pyroscope/update-to-head.sh python2
+}
+
+_update() {
+ git -C .local/pyroscope pull
+ ~/.local/pyroscope/update-to-head.sh python2
+}
+
+cd $HOME
+[[ -d .local/pyroscope ]] &&
+ _update || _install