Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Script for pulling, building and testing MaidSafe code
#!/bin/bash
#### if you use a proxy add it here
# http_proxy=http://127.0.0.1:8118/
# HTTP_PROXY=$http_proxy
# export http_proxy HTTP_PROXY
# git config --global http.proxy $HTTP_PROXY
##### end proxy stuff ##########
#### add your parent folder here ####
parentFolder='/home/phil/src/rust/maidsafe/'
if [ ! -d ${parentFolder} ]; then
mkdir ${parentFolder}
fi
dirs="crust routing maidsafe_client maidsafe_types maidsafe_vault maidsafe_nfs"
cd ${parentFolder}
pull() {
subFolder=${parentFolder}${1}
if [ ! -d ${subFolder} ]; then
git clone https://github.com/maidsafe/${1}
else
cd ${subFolder}
git pull origin master
fi
}
build() {
subFolder=${parentFolder}${1}
cd ${subFolder}
cargo build &
}
tst() {
subFolder=${parentFolder}${1}
xterm -hold -e "cd ${subFolder} && cargo test" &
}
for action in pull build tst
do
for dir in $dirs
do
echo ""
echo $dir
echo ""
# echo "Hit ENTER to continue:"
# read junk
$action $dir
done
done
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.