From 4d1194dfeef617f4c90b846b75f68ff566bce539 Mon Sep 17 00:00:00 2001 From: howcanunot Date: Mon, 18 Mar 2024 03:14:44 +0300 Subject: [PATCH 1/9] Revert "Revert "install tlmgr util if necessary"" This reverts commit e9e700c81b6cf41deeeffd387d50c6eee43c26e5. --- steps/install.sh | 100 +++++++++++++---------------------------------- 1 file changed, 28 insertions(+), 72 deletions(-) diff --git a/steps/install.sh b/steps/install.sh index 3ed677d8..8cd981f9 100755 --- a/steps/install.sh +++ b/steps/install.sh @@ -47,77 +47,40 @@ if [ -n "${linux}" ]; then apt-get install -y coreutils fi -if ! parallel --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get -y install parallel - else - echo "Install 'parallel' somehow" - exit 1 +install_or_quit() { + if ! dpkg -s "$1" >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get -y install "$1" + else + echo "Install '$1' somehow" + exit 1 + fi fi -fi - -if ! bc -v >/dev/null 2>&1; then +} + +install_or_quit 'parallel' +install_or_quit 'bc' +install_or_quit 'cloc' +install_or_quit 'jq' +install_or_quit 'xpdf' +install_or_quit 'shellcheck' +install_or_quit 'aspell' +install_or_quit 'xmlstarlet' + +if [ ! -f "/usr/local/texlive/$(date +%Y)/bin/x86_64-linux/tlmgr" ]; then if [ -n "${linux}" ]; then - apt-get install -y bc + wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \ + zcat < install-tl-unx.tar.gz | tar xf - && \ + rm install-tl-unx.tar.gz && \ + cd install-tl-$(date +%Y)* && \ + perl ./install-tl --scheme=e --no-interaction else - echo "Install 'GNU bc' somehow" + echo "Install 'texlive-base' somehow" exit 1 fi fi -if ! cloc --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y cloc - else - echo "Install 'cloc' somehow" - exit 1 - fi -fi - -if ! jq --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y jq - else - echo "Install 'jq' somehow" - exit 1 - fi -fi - -if ! pdftotext -v >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y xpdf - else - echo "Install 'poppler' somehow" - exit 1 - fi -fi - -if ! shellcheck --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y shellcheck - else - echo "Install 'shellcheck' somehow" - exit 1 - fi -fi - -if ! aspell --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y aspell - else - echo "Install 'GNU aspell' somehow" - exit 1 - fi -fi - -if ! xmlstarlet --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y xmlstarlet - else - echo "Install 'xmlstarlet' somehow" - exit 1 - fi -fi +export PATH=/usr/local/texlive/$(date +%Y)/bin/x86_64-linux:$PATH if [ ! -e "${HOME}/texmf" ]; then $SUDO tlmgr init-usertree @@ -132,14 +95,7 @@ done < <( cut -d' ' -f2 "${root}/../DEPENDS.txt" | uniq ) $SUDO tlmgr --verify-repo=none install "${packages[@]}" $SUDO tlmgr --verify-repo=none update --no-auto-remove "${packages[@]}" || echo 'Failed to update' -if ! pygmentize -V >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y python3-pygments - else - echo "Install 'python3-pygments' somehow" - exit 1 - fi -fi +install_or_quit 'python3-pygments' $SUDO python3 -m pip install --upgrade pip $SUDO python3 -m pip install -r "${LOCAL}/requirements.txt" From 37f04db4938952a29799b03129169307a6ce4224 Mon Sep 17 00:00:00 2001 From: howcanunot Date: Mon, 18 Mar 2024 03:15:41 +0300 Subject: [PATCH 2/9] Revert "Revert "Revert "install tlmgr util if necessary""" This reverts commit 4d1194dfeef617f4c90b846b75f68ff566bce539. --- steps/install.sh | 100 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 72 insertions(+), 28 deletions(-) diff --git a/steps/install.sh b/steps/install.sh index 8cd981f9..3ed677d8 100755 --- a/steps/install.sh +++ b/steps/install.sh @@ -47,40 +47,77 @@ if [ -n "${linux}" ]; then apt-get install -y coreutils fi -install_or_quit() { - if ! dpkg -s "$1" >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get -y install "$1" - else - echo "Install '$1' somehow" - exit 1 - fi +if ! parallel --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get -y install parallel + else + echo "Install 'parallel' somehow" + exit 1 fi -} - -install_or_quit 'parallel' -install_or_quit 'bc' -install_or_quit 'cloc' -install_or_quit 'jq' -install_or_quit 'xpdf' -install_or_quit 'shellcheck' -install_or_quit 'aspell' -install_or_quit 'xmlstarlet' - -if [ ! -f "/usr/local/texlive/$(date +%Y)/bin/x86_64-linux/tlmgr" ]; then +fi + +if ! bc -v >/dev/null 2>&1; then if [ -n "${linux}" ]; then - wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \ - zcat < install-tl-unx.tar.gz | tar xf - && \ - rm install-tl-unx.tar.gz && \ - cd install-tl-$(date +%Y)* && \ - perl ./install-tl --scheme=e --no-interaction + apt-get install -y bc else - echo "Install 'texlive-base' somehow" + echo "Install 'GNU bc' somehow" exit 1 fi fi -export PATH=/usr/local/texlive/$(date +%Y)/bin/x86_64-linux:$PATH +if ! cloc --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y cloc + else + echo "Install 'cloc' somehow" + exit 1 + fi +fi + +if ! jq --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y jq + else + echo "Install 'jq' somehow" + exit 1 + fi +fi + +if ! pdftotext -v >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y xpdf + else + echo "Install 'poppler' somehow" + exit 1 + fi +fi + +if ! shellcheck --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y shellcheck + else + echo "Install 'shellcheck' somehow" + exit 1 + fi +fi + +if ! aspell --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y aspell + else + echo "Install 'GNU aspell' somehow" + exit 1 + fi +fi + +if ! xmlstarlet --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y xmlstarlet + else + echo "Install 'xmlstarlet' somehow" + exit 1 + fi +fi if [ ! -e "${HOME}/texmf" ]; then $SUDO tlmgr init-usertree @@ -95,7 +132,14 @@ done < <( cut -d' ' -f2 "${root}/../DEPENDS.txt" | uniq ) $SUDO tlmgr --verify-repo=none install "${packages[@]}" $SUDO tlmgr --verify-repo=none update --no-auto-remove "${packages[@]}" || echo 'Failed to update' -install_or_quit 'python3-pygments' +if ! pygmentize -V >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y python3-pygments + else + echo "Install 'python3-pygments' somehow" + exit 1 + fi +fi $SUDO python3 -m pip install --upgrade pip $SUDO python3 -m pip install -r "${LOCAL}/requirements.txt" From 3f459012cfad58a176e779d91ef386b76f1530f6 Mon Sep 17 00:00:00 2001 From: howcanunot Date: Mon, 18 Mar 2024 03:44:32 +0300 Subject: [PATCH 3/9] fix commits --- steps/discover-repos.rb | 2 +- steps/install.sh | 100 +++++++++++----------------------------- 2 files changed, 29 insertions(+), 73 deletions(-) diff --git a/steps/discover-repos.rb b/steps/discover-repos.rb index a26a979d..cd3fac79 100755 --- a/steps/discover-repos.rb +++ b/steps/discover-repos.rb @@ -102,7 +102,7 @@ puts "Found #{found.count} total repositories in GitHub" if found.count > opts[:total] - found = found.first(opts[:total]).to_h + found = found.first(opts[:total]) puts "We will use only the first #{opts[:total]} repositories" end diff --git a/steps/install.sh b/steps/install.sh index 3ed677d8..8f0c2edd 100755 --- a/steps/install.sh +++ b/steps/install.sh @@ -47,77 +47,40 @@ if [ -n "${linux}" ]; then apt-get install -y coreutils fi -if ! parallel --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get -y install parallel - else - echo "Install 'parallel' somehow" - exit 1 +install_or_quit() { + if ! dpkg -s "$1" >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get -y install "$1" + else + echo "Install '$1' somehow" + exit 1 + fi fi -fi - -if ! bc -v >/dev/null 2>&1; then +} + +install_or_quit 'parallel' +install_or_quit 'bc' +install_or_quit 'cloc' +install_or_quit 'jq' +install_or_quit 'xpdf' +install_or_quit 'shellcheck' +install_or_quit 'aspell' +install_or_quit 'xmlstarlet' + +if [ ! -f "/usr/local/texlive/$(date +%Y)/bin/x86_64-linux/tlmgr" ]; then if [ -n "${linux}" ]; then - apt-get install -y bc + wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \ + zcat < install-tl-unx.tar.gz | tar xf - && \ + rm install-tl-unx.tar.gz && \ + cd install-tl-$(date +%Y)* && \ + perl ./install-tl --scheme=e --no-interaction else - echo "Install 'GNU bc' somehow" + echo "Install 'texlive-base' somehow" exit 1 fi fi -if ! cloc --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y cloc - else - echo "Install 'cloc' somehow" - exit 1 - fi -fi - -if ! jq --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y jq - else - echo "Install 'jq' somehow" - exit 1 - fi -fi - -if ! pdftotext -v >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y xpdf - else - echo "Install 'poppler' somehow" - exit 1 - fi -fi - -if ! shellcheck --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y shellcheck - else - echo "Install 'shellcheck' somehow" - exit 1 - fi -fi - -if ! aspell --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y aspell - else - echo "Install 'GNU aspell' somehow" - exit 1 - fi -fi - -if ! xmlstarlet --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y xmlstarlet - else - echo "Install 'xmlstarlet' somehow" - exit 1 - fi -fi +export PATH=/usr/local/texlive/$(date +%Y)/bin/x86_64-linux:$PATH if [ ! -e "${HOME}/texmf" ]; then $SUDO tlmgr init-usertree @@ -132,14 +95,7 @@ done < <( cut -d' ' -f2 "${root}/../DEPENDS.txt" | uniq ) $SUDO tlmgr --verify-repo=none install "${packages[@]}" $SUDO tlmgr --verify-repo=none update --no-auto-remove "${packages[@]}" || echo 'Failed to update' -if ! pygmentize -V >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y python3-pygments - else - echo "Install 'python3-pygments' somehow" - exit 1 - fi -fi +install_or_quit 'python3-pygments' $SUDO python3 -m pip install --upgrade pip $SUDO python3 -m pip install -r "${LOCAL}/requirements.txt" From 892991b6585915828d975f9e9910f7323dbeadb7 Mon Sep 17 00:00:00 2001 From: howcanunot Date: Tue, 19 Mar 2024 23:18:44 +0300 Subject: [PATCH 4/9] make install working for every platform --- steps/install.sh | 108 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 84 insertions(+), 24 deletions(-) diff --git a/steps/install.sh b/steps/install.sh index 8f0c2edd..750dd06f 100755 --- a/steps/install.sh +++ b/steps/install.sh @@ -47,40 +47,93 @@ if [ -n "${linux}" ]; then apt-get install -y coreutils fi -install_or_quit() { - if ! dpkg -s "$1" >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get -y install "$1" - else - echo "Install '$1' somehow" - exit 1 - fi +if ! parallel --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get -y install parallel + else + echo "Install 'parallel' somehow" + exit 1 + fi +fi + +if ! bc -v >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y bc + else + echo "Install 'GNU bc' somehow" + exit 1 + fi +fi + +if ! cloc --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y cloc + else + echo "Install 'cloc' somehow" + exit 1 + fi +fi + +if ! jq --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y jq + else + echo "Install 'jq' somehow" + exit 1 + fi +fi + +if ! pdftotext -v >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y xpdf + else + echo "Install 'poppler' somehow" + exit 1 + fi +fi + +if ! shellcheck --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y shellcheck + else + echo "Install 'shellcheck' somehow" + exit 1 + fi +fi + +if ! aspell --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y aspell + else + echo "Install 'GNU aspell' somehow" + exit 1 fi -} - -install_or_quit 'parallel' -install_or_quit 'bc' -install_or_quit 'cloc' -install_or_quit 'jq' -install_or_quit 'xpdf' -install_or_quit 'shellcheck' -install_or_quit 'aspell' -install_or_quit 'xmlstarlet' - -if [ ! -f "/usr/local/texlive/$(date +%Y)/bin/x86_64-linux/tlmgr" ]; then +fi + +if ! xmlstarlet --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y xmlstarlet + else + echo "Install 'xmlstarlet' somehow" + exit 1 + fi +fi + +if [ ! -f "/usr/local/texlive/$(date +%Y)/bin/*/tlmgr" ]; then if [ -n "${linux}" ]; then wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \ zcat < install-tl-unx.tar.gz | tar xf - && \ rm install-tl-unx.tar.gz && \ - cd install-tl-$(date +%Y)* && \ + cd install-tl-"$(date +%Y)"* && \ perl ./install-tl --scheme=e --no-interaction else - echo "Install 'texlive-base' somehow" + echo "Install 'texlive' somehow" exit 1 fi fi -export PATH=/usr/local/texlive/$(date +%Y)/bin/x86_64-linux:$PATH +TEXLIVE_DIR=$(ls -d /usr/local/texlive/"$(date +%Y)"/bin/*/) +PATH="$PATH:$TEXLIVE_DIR" if [ ! -e "${HOME}/texmf" ]; then $SUDO tlmgr init-usertree @@ -95,7 +148,14 @@ done < <( cut -d' ' -f2 "${root}/../DEPENDS.txt" | uniq ) $SUDO tlmgr --verify-repo=none install "${packages[@]}" $SUDO tlmgr --verify-repo=none update --no-auto-remove "${packages[@]}" || echo 'Failed to update' -install_or_quit 'python3-pygments' +if ! pygmentize -V >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y python3-pygments + else + echo "Install 'python3-pygments' somehow" + exit 1 + fi +fi $SUDO python3 -m pip install --upgrade pip $SUDO python3 -m pip install -r "${LOCAL}/requirements.txt" From 74dc7648bec65816f0f6bda69904f37bdf8da070 Mon Sep 17 00:00:00 2001 From: howcanunot Date: Wed, 20 Mar 2024 00:50:10 +0300 Subject: [PATCH 5/9] fix if statement --- steps/install.sh | 85 +++++++++++++----------------------------------- 1 file changed, 22 insertions(+), 63 deletions(-) diff --git a/steps/install.sh b/steps/install.sh index 750dd06f..5f57d07a 100755 --- a/steps/install.sh +++ b/steps/install.sh @@ -47,41 +47,26 @@ if [ -n "${linux}" ]; then apt-get install -y coreutils fi -if ! parallel --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get -y install parallel - else - echo "Install 'parallel' somehow" - exit 1 - fi -fi - -if ! bc -v >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y bc - else - echo "Install 'GNU bc' somehow" - exit 1 - fi -fi - -if ! cloc --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y cloc - else - echo "Install 'cloc' somehow" - exit 1 - fi -fi - -if ! jq --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y jq - else - echo "Install 'jq' somehow" - exit 1 - fi -fi +function install_package() { + local PACKAGE=$1 + + if ! eval $PACKAGE --version >/dev/null 2>&1; then + if [ -n "${linux}" ]; then + apt-get install -y $PACKAGE + else + echo "Install '$PACKAGE' somehow" + exit 1 + fi + fi +} + +install_package "parallel" +install_package "bc" +install_package "cloc" +install_package "jq" +install_package "shellcheck" +install_package "aspell" +install_package "xmlstarlet" if ! pdftotext -v >/dev/null 2>&1; then if [ -n "${linux}" ]; then @@ -92,40 +77,14 @@ if ! pdftotext -v >/dev/null 2>&1; then fi fi -if ! shellcheck --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y shellcheck - else - echo "Install 'shellcheck' somehow" - exit 1 - fi -fi - -if ! aspell --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y aspell - else - echo "Install 'GNU aspell' somehow" - exit 1 - fi -fi - -if ! xmlstarlet --version >/dev/null 2>&1; then - if [ -n "${linux}" ]; then - apt-get install -y xmlstarlet - else - echo "Install 'xmlstarlet' somehow" - exit 1 - fi -fi - -if [ ! -f "/usr/local/texlive/$(date +%Y)/bin/*/tlmgr" ]; then +if [ ! -d /usr/local/texlive/"$(date +%Y)"/bin/* ]; then if [ -n "${linux}" ]; then wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \ zcat < install-tl-unx.tar.gz | tar xf - && \ rm install-tl-unx.tar.gz && \ cd install-tl-"$(date +%Y)"* && \ perl ./install-tl --scheme=e --no-interaction + cd .. && rm -r install-tl-"$(date +%Y)"* else echo "Install 'texlive' somehow" exit 1 From e4cbb5ebc6d829fee2c6d98a0106e1d8af1a7e39 Mon Sep 17 00:00:00 2001 From: howcanunot Date: Wed, 20 Mar 2024 00:55:42 +0300 Subject: [PATCH 6/9] fix if statement --- steps/install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/steps/install.sh b/steps/install.sh index 5f57d07a..94245341 100755 --- a/steps/install.sh +++ b/steps/install.sh @@ -50,9 +50,9 @@ fi function install_package() { local PACKAGE=$1 - if ! eval $PACKAGE --version >/dev/null 2>&1; then + if ! eval "$PACKAGE" --version >/dev/null 2>&1; then if [ -n "${linux}" ]; then - apt-get install -y $PACKAGE + apt-get install -y "$PACKAGE" else echo "Install '$PACKAGE' somehow" exit 1 @@ -77,7 +77,7 @@ if ! pdftotext -v >/dev/null 2>&1; then fi fi -if [ ! -d /usr/local/texlive/"$(date +%Y)"/bin/* ]; then +if [ ! -d /usr/local/texlive/"$(date +%Y)"/bin ]; then if [ -n "${linux}" ]; then wget https://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz && \ zcat < install-tl-unx.tar.gz | tar xf - && \ From 9bf57ac2130ac79f8e343d8f7d4bc09917791820 Mon Sep 17 00:00:00 2001 From: howcanunot Date: Wed, 20 Mar 2024 02:17:35 +0300 Subject: [PATCH 7/9] export PATH --- steps/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steps/install.sh b/steps/install.sh index 94245341..4ff683e2 100755 --- a/steps/install.sh +++ b/steps/install.sh @@ -92,7 +92,7 @@ if [ ! -d /usr/local/texlive/"$(date +%Y)"/bin ]; then fi TEXLIVE_DIR=$(ls -d /usr/local/texlive/"$(date +%Y)"/bin/*/) -PATH="$PATH:$TEXLIVE_DIR" +export PATH="$PATH:$TEXLIVE_DIR" if [ ! -e "${HOME}/texmf" ]; then $SUDO tlmgr init-usertree From de10cb9e7750f224dac8aaa891280952afd6dbff Mon Sep 17 00:00:00 2001 From: Bogdan Savko Date: Wed, 20 Mar 2024 20:48:05 +0300 Subject: [PATCH 8/9] change inside if --- steps/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/steps/install.sh b/steps/install.sh index 4ff683e2..31099890 100755 --- a/steps/install.sh +++ b/steps/install.sh @@ -85,15 +85,14 @@ if [ ! -d /usr/local/texlive/"$(date +%Y)"/bin ]; then cd install-tl-"$(date +%Y)"* && \ perl ./install-tl --scheme=e --no-interaction cd .. && rm -r install-tl-"$(date +%Y)"* + TEXLIVE_DIR=$(ls -d /usr/local/texlive/"$(date +%Y)"/bin/*/) + export PATH="$PATH:$TEXLIVE_DIR" else echo "Install 'texlive' somehow" exit 1 fi fi -TEXLIVE_DIR=$(ls -d /usr/local/texlive/"$(date +%Y)"/bin/*/) -export PATH="$PATH:$TEXLIVE_DIR" - if [ ! -e "${HOME}/texmf" ]; then $SUDO tlmgr init-usertree fi From 7bf7876441875f6e797fbfc8f58abbe0d1354e1e Mon Sep 17 00:00:00 2001 From: Bogdan Savko Date: Wed, 20 Mar 2024 21:55:06 +0300 Subject: [PATCH 9/9] some fixes --- steps/discover-repos.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/steps/discover-repos.rb b/steps/discover-repos.rb index 9b4b2219..74c14742 100755 --- a/steps/discover-repos.rb +++ b/steps/discover-repos.rb @@ -102,7 +102,7 @@ puts "Found #{found.count} total repositories in GitHub" if found.count > opts[:total] - found = found.first(opts[:total]) + found = found.first(opts[:total]).to_h puts "We will use only the first #{opts[:total]} repositories" end