├── bin ├── release ├── detect └── compile └── README.md /bin/release: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | echo "--- {}" 3 | -------------------------------------------------------------------------------- /bin/detect: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # this pack is valid for all apps 4 | echo "aria2c" 5 | exit 0 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aria2-heroku 2 | 3 | A Heroku buildpack for aria2 that always downloads the latest static build. 4 | Unlike other build packs, I never compile anything and remove this git. 5 | 6 | ## Usage 7 | 8 | Add the following to your `.buildpacks`: 9 | 10 | ``` 11 | https://github.com/amivin/aria2-heroku.git 12 | ``` 13 | 14 | Or run the following from the heroku command line: 15 | 16 | ``` 17 | heroku buildpacks:add https://github.com/amivin/aria2-heroku.git 18 | ``` 19 | -------------------------------------------------------------------------------- /bin/compile: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | indent() { 4 | sed -u 's/^/ /' 5 | } 6 | 7 | echo "-----> Install aria2c" 8 | BUILD_DIR=$1 9 | VENDOR_DIR="vendor" 10 | FILE="aria2-1.34.0-linux-gnu-64bit-build1" 11 | DOWNLOAD_URL="https://github.com/q3aql/aria2-static-builds/releases/download/v1.34.0/$FILE.tar.bz2" 12 | 13 | echo "DOWNLOAD_URL = " $DOWNLOAD_URL | indent 14 | 15 | cd $BUILD_DIR 16 | mkdir -p $VENDOR_DIR 17 | cd $VENDOR_DIR 18 | mkdir -p aria2c 19 | cd aria2c 20 | wget -q $DOWNLOAD_URL 21 | tar jxf $FILE.tar.bz2 22 | mv $FILE/* . 23 | rm -rf $FILE $FILE.tar.bz2 24 | 25 | echo "exporting PATH" | indent 26 | PROFILE_PATH="$BUILD_DIR/.profile.d/aria2c.sh" 27 | mkdir -p $(dirname $PROFILE_PATH) 28 | echo 'export PATH="$PATH:${HOME}/vendor/aria2c"' >> $PROFILE_PATH 29 | --------------------------------------------------------------------------------