From 080a96991deaa00cedb9ea3f3af084e0fa14ba36 Mon Sep 17 00:00:00 2001 From: mollusk Date: Wed, 28 Oct 2020 00:50:08 -0400 Subject: [PATCH 1/3] Change paths to final locations --- repo.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/repo.sh b/repo.sh index 08c94e5..5c3a1ca 100755 --- a/repo.sh +++ b/repo.sh @@ -1,6 +1,6 @@ #!/bin/bash -CONFIG_DIR="${HOME}/.config/vur" +CONFIG_DIR="/voidpkg/vur" CONFIG_FILE="vur.conf" KEY_FILE="privkey.pem" KEY_PATH="${CONFIG_DIR}/${KEY_FILE}" @@ -19,7 +19,7 @@ get_void_pkgs(){ read vpkgs_location if [ -z "${vpkgs_location}" ];then - vpkgs_location="${HOME}/vur" + vpkgs_location="/voidpkg/void-packages" echo "Creating directory: ${vpkgs_location}" mkdir -p "${vpkgs_location}" git clone https://github.com/void-linux/void-packages.git "${vpkgs_location}" @@ -51,7 +51,6 @@ gen_conf(){ echo "void_packages=${void_packages_location}/hostdir/binpkgs" >> "${CONFIG_DIR}/${CONFIG_FILE}" - echo "Provid enter the full path of your custom repository: " source "${CONFIG_DIR}/${CONFIG_FILE}" fi } From 8ba540df51a49f2cb06ac345602cd880e35e231a Mon Sep 17 00:00:00 2001 From: mollusk Date: Wed, 28 Oct 2020 01:32:58 -0400 Subject: [PATCH 2/3] Clone void-packages with ssh --- repo.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/repo.sh b/repo.sh index 5c3a1ca..10baaef 100755 --- a/repo.sh +++ b/repo.sh @@ -25,9 +25,30 @@ get_void_pkgs(){ git clone https://github.com/void-linux/void-packages.git "${vpkgs_location}" elif [ -n "${vpkgs_location}" ];then - echo "Creating directory: ${vpkgs_location}" - git clone https://github.com/void-linux/void-packages.git "${vpkgs_location}" + while true;do + echo -n "Use ssh? [y/N]: " + read use_ssh + if [ -z "${use_ssh}" ] || [ "${use_ssh}" = "n" ] || [ "${use_ssh}" = "N" ] ;then + echo "Creating directory: ${vpkgs_location}" + + git clone https://github.com/void-linux/void-packages.git "${vpkgs_location}" || exit 1 + break + + + elif [ "${use_ssh}" = "y" ] || [ "${use_ssh}" = "Y" ];then + + echo -n "Remote git username? (i.e github username): " + read git_user + + git clone github.com:"${git_user}"/void-packages.git "${vpkgs_location}" || exit 1 + break + + else + + echo "please enter y, n, or leave blank" + fi + done fi } From 2f5035a935142aeadcc22a216572b104cd1ded38 Mon Sep 17 00:00:00 2001 From: mollusk Date: Wed, 28 Oct 2020 01:35:16 -0400 Subject: [PATCH 3/3] fix incorrect github ssh url --- repo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo.sh b/repo.sh index 10baaef..09a5dbf 100755 --- a/repo.sh +++ b/repo.sh @@ -41,7 +41,7 @@ get_void_pkgs(){ echo -n "Remote git username? (i.e github username): " read git_user - git clone github.com:"${git_user}"/void-packages.git "${vpkgs_location}" || exit 1 + git clone git@github.com:"${git_user}"/void-packages.git "${vpkgs_location}" || exit 1 break else