From e77f752fe98e8458797e413c4373d5dee3c3c93f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 17 Apr 2016 16:45:16 +0100 Subject: rename helper scripts to something more clear --- usermodeset | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 usermodeset (limited to 'usermodeset') diff --git a/usermodeset b/usermodeset new file mode 100755 index 0000000..6a8e925 --- /dev/null +++ b/usermodeset @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +fetch_usermode_portage_tree() { + if [[ ! -d /usr/portage/.git ]] ; then + cd /usr/portage && git init > /dev/null 2>&1 + git remote add origin git://anongit.gentoo.org/repo/gentoo.git + git config core.sparsecheckout true + echo "profiles/*" >> .git/info/sparse-checkout + echo "metadata/*" >> .git/info/sparse-checkout + echo "eclass/*" >> .git/info/sparse-checkout + echo ".gitignore" >> .git/info/sparse-checkout + git pull --depth=1 origin master + git branch -u origin/master master + rm -rf /usr/portage/profiles/updates + fi +} + +set_usermode_portage_tree() { + ln -sf /opt/kogaion-build/conf/intel/portage /etc/portage + ln -sf /etc/portage/make.conf.amd64-user /etc/portage/make.conf + eselect profile set 1 + env-update + . /etc/profile +} + +main() { + fetch_usermode_portage_tree + set_usermode_portage_tree +} + +main -- cgit v1.2.3 From 8fb6dc9a8dc3c44c69f579d649ddd0afb36c4cce Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 20 Apr 2016 18:03:21 +0100 Subject: make use of variables, avoid removal of distfiles and package directories when switching modes --- usermodeset | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'usermodeset') diff --git a/usermodeset b/usermodeset index 6a8e925..ae4a9ec 100755 --- a/usermodeset +++ b/usermodeset @@ -1,8 +1,12 @@ #!/usr/bin/env bash +export local portagedir="/usr/portage" +export local confdir="/etc/portage" +export local gitdir="/opt/kogaion-build/conf/intel/portage" + fetch_usermode_portage_tree() { - if [[ ! -d /usr/portage/.git ]] ; then - cd /usr/portage && git init > /dev/null 2>&1 + if [[ ! -d "$portagedir"/.git ]] ; then + cd "$portagedir" && git init > /dev/null 2>&1 git remote add origin git://anongit.gentoo.org/repo/gentoo.git git config core.sparsecheckout true echo "profiles/*" >> .git/info/sparse-checkout @@ -11,13 +15,13 @@ fetch_usermode_portage_tree() { echo ".gitignore" >> .git/info/sparse-checkout git pull --depth=1 origin master git branch -u origin/master master - rm -rf /usr/portage/profiles/updates + rm -rf ""$portagedir"/profiles/updates" fi } set_usermode_portage_tree() { - ln -sf /opt/kogaion-build/conf/intel/portage /etc/portage - ln -sf /etc/portage/make.conf.amd64-user /etc/portage/make.conf + ln -sf "$gitdir" "$confdir" + ln -sf "$confdir"/make.conf.amd64-user "$confdir"/make.conf eselect profile set 1 env-update . /etc/profile -- cgit v1.2.3 From 21b03a3f899c380310f084ea7ac9bb34cf5b677e Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 22 Sep 2016 18:03:26 +0100 Subject: make vasile use our portage tree clone --- usermodeset | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usermodeset') diff --git a/usermodeset b/usermodeset index ae4a9ec..0edef40 100755 --- a/usermodeset +++ b/usermodeset @@ -7,7 +7,7 @@ export local gitdir="/opt/kogaion-build/conf/intel/portage" fetch_usermode_portage_tree() { if [[ ! -d "$portagedir"/.git ]] ; then cd "$portagedir" && git init > /dev/null 2>&1 - git remote add origin git://anongit.gentoo.org/repo/gentoo.git + git remote add origin https://gitlab.com/kogaion/portage.git git config core.sparsecheckout true echo "profiles/*" >> .git/info/sparse-checkout echo "metadata/*" >> .git/info/sparse-checkout -- cgit v1.2.3