blob: 4dfb7abdb6bda7be65d6a5e1f85dd89a85d4f4fd (
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 "D: 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 "D: can't reset to $checkout"
cd -
exit 1
fi
cd -
|