|
|
@ -103,9 +103,9 @@ pub fn clone(verbose: bool) {
|
|
|
|
// Create an empty directory with repo.name and enter it
|
|
|
|
// Create an empty directory with repo.name and enter it
|
|
|
|
let root_dir = env::current_dir().unwrap();
|
|
|
|
let root_dir = env::current_dir().unwrap();
|
|
|
|
|
|
|
|
|
|
|
|
// Git clone the repo with the `-n` flag to not immediately checkout the files
|
|
|
|
// Git clone the repo
|
|
|
|
Command::new("git")
|
|
|
|
Command::new("git")
|
|
|
|
.args(&["clone", &r.url, &r.name, "-n"])
|
|
|
|
.args(&["clone", &r.url, &r.name])
|
|
|
|
.args(if r.branch.is_some() {
|
|
|
|
.args(if r.branch.is_some() {
|
|
|
|
vec!["-b", r.branch.as_ref().unwrap()]
|
|
|
|
vec!["-b", r.branch.as_ref().unwrap()]
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -122,14 +122,7 @@ pub fn clone(verbose: bool) {
|
|
|
|
// Git checkout the PKGBUILD from the hash
|
|
|
|
// Git checkout the PKGBUILD from the hash
|
|
|
|
if r.extra.is_some() {
|
|
|
|
if r.extra.is_some() {
|
|
|
|
Command::new("git")
|
|
|
|
Command::new("git")
|
|
|
|
.args(&["checkout", r.extra.as_ref().unwrap(), "PKGBUILD"])
|
|
|
|
.args(&["checkout", r.extra.as_ref().unwrap()])
|
|
|
|
.spawn()
|
|
|
|
|
|
|
|
.unwrap()
|
|
|
|
|
|
|
|
.wait()
|
|
|
|
|
|
|
|
.unwrap();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
Command::new("git")
|
|
|
|
|
|
|
|
.args(&["checkout", "HEAD", "PKGBUILD"])
|
|
|
|
|
|
|
|
.spawn()
|
|
|
|
.spawn()
|
|
|
|
.unwrap()
|
|
|
|
.unwrap()
|
|
|
|
.wait()
|
|
|
|
.wait()
|
|
|
|