From 722fe1d78b4f887875b1a7cf96a30850eab6faf8 Mon Sep 17 00:00:00 2001 From: phalanx-hk Date: Fri, 26 Jan 2024 01:09:51 +0900 Subject: [PATCH] Add act installation script and remove apt installation script --- install/ubuntu/common/act.sh | 6 +++ install/ubuntu/common/apt.sh | 95 ------------------------------------ 2 files changed, 6 insertions(+), 95 deletions(-) create mode 100644 install/ubuntu/common/act.sh delete mode 100644 install/ubuntu/common/apt.sh diff --git a/install/ubuntu/common/act.sh b/install/ubuntu/common/act.sh new file mode 100644 index 0000000..90b50de --- /dev/null +++ b/install/ubuntu/common/act.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +# act +echo "--- install act is start! ---" +curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash +echo "--- install act is done! ---" \ No newline at end of file diff --git a/install/ubuntu/common/apt.sh b/install/ubuntu/common/apt.sh deleted file mode 100644 index c92e2fe..0000000 --- a/install/ubuntu/common/apt.sh +++ /dev/null @@ -1,95 +0,0 @@ -#!/usr/bin/env bash - -function install_eza() { - mkdir -p /etc/apt/keyrings - wget -qO- https://raw.githubusercontent.com/eza-community/eza/main/deb.asc | gpg --dearmor -o /etc/apt/keyrings/gierens.gpg - echo "deb [signed-by=/etc/apt/keyrings/gierens.gpg] http://deb.gierens.de stable main" | tee /etc/apt/sources.list.d/gierens.list - chmod 644 /etc/apt/keyrings/gierens.gpg /etc/apt/sources.list.d/gierens.list - apt update - apt install -y eza -} - -function install_gh() { - curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && - chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg && - echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list >/dev/null && - apt update && - apt install gh -y -} - -function install_bottom() { - local tmp_file - tmp_file="$(mktemp /tmp/bottom-XXXXXXXXXX.deb)" - api_endpoint="https://api.github.com/repos/ClementTsang/bottom/releases/latest" - latest_version=$(curl -s $api_endpoint | jq -r '.tag_name') - if [ "$(uname -m)" != "x86_64" ]; then - deb_url=https://github.com/ClementTsang/bottom/releases/download/${latest_version}/bottom_${latest_version}_arm64.deb - else; then - deb_url=https://github.com/ClementTsang/bottom/releases/download/${latest_version}/bottom_${latest_version}_amd64.deb - fi - curl -fSL "{$deb_url}" -o "${tmp_file}" - dpkg -i install $tmp_file -} - -function install_packer() { - curl -fsSL https://apt.releases.hashicorp.com/gpg | apt-key add - - if [ "$(uname -m)" != "x86_64" ]; then - apt-add-repository "deb [arch=arm64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" - else; then - apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" - fi - apt update && apt install packer -} - -function install_docker() { - curl -fsSL 'https://download.docker.com/linux/ubuntu/gpg' | apt-key add - - if [ "$(uname -m)" != "x86_64" ]; then - add-apt-repository -y "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - else; then - add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - fi - apt-get update - apt-get install -y docker-ce docker-ce-cli -} - -function install_base() { - add-apt-repository -y ppa:git-core/ppa - apt-get update - apt-get upgrade -y - apt-get install -y \ - autoconf \ - bat \ - build-essential \ - clang \ - clangd \ - clang-format \ - cmake \ - fd-find \ - git \ - git-lfs \ - gpg \ - just \ - jq \ - libfuse-dev \ - libsqlite3-dev \ - libssl-dev \ - ripgrep \ - shellcheck \ - sqlite3 \ - trash-cli \ - unzip \ - wget \ - zip \ - zsh -} - -function main() { - install_base - install_gh - install_eza - install_bottom - install_docker - install_packer -} - -main \ No newline at end of file