blob: 83a5612f23ebc8d4b7678cbb7fe87c0d7af38837 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/bin/bash
export LOG_PREFIX="[fetch_code $remote @ $checkout -> $path]"
log "getting the codez~ time to fetch!"
git clone "$remote" "$path"
if [ ! $? -eq 0 ]; then
log "oh nyo! couldn't clone the repo"
exit 1
fi
cd "$path"
log "switching to $checkout like a good kitty~"
git reset --hard "$checkout"
if [ ! $? -eq 0 ]; then
log "ouchie! can't reset to $checkout"
cd -
exit 1
fi
cd -
|