Last active
August 29, 2015 14:22
-
-
Save dbadapt/da21716b280834b48f31 to your computer and use it in GitHub Desktop.
Get a single file from a launchpad repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# download a single file from launchpad | |
SRC_FILE=pxc56-mtr.sh | |
REL_URL=$( | |
wget -q -O - "http://bazaar.launchpad.net/~percona-core/percona-qa/trunk/view/head:/${SRC_FILE}" \ | |
| grep 'download file' \ | |
| head -n1 \ | |
| cut -d'"' -f2 | |
) | |
ABS_URL="http://bazaar.launchpad.net${REL_URL}" | |
wget -q -O - "$ABS_URL" > ${SRC_FILE} | |
chmod 755 ${SRC_FILE} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment