new updater script (#5132)

This commit is contained in:
David Holdeman 2023-02-25 17:07:31 -06:00 committed by GitHub
parent 4b8e5cd451
commit e46a3f2376
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 29 additions and 39 deletions

View File

@ -1,14 +0,0 @@
#!/usr/bin/env bash
# run as root
> /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
for mirror in \
'http://ubuntu.osuosl.org/ubuntu/' \
'http://mirrors.ocf.berkeley.edu/ubuntu/' \
; do
cat /etc/apt/sources.list >> /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
sed "s#http://azure.archive.ubuntu.com/ubuntu/#$mirror#" -i /etc/apt/sources.list.d/ubuntu-latest-mirrors.list
done
apt-get -o Acquire::Retries=3 update

View File

@ -23,9 +23,8 @@ jobs:
java-version: '8'
- name: Install Tools
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install mtools
- name: Generate Configs, Enums & Live Documentation

View File

@ -359,12 +359,9 @@ jobs:
- name: Install multilib, mingw, sshpass and mtools
if: ${{ env.skip != 'true' }}
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 sshpass mtools
sudo apt-get install zip
sudo apt-get install dosfstools
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 sshpass mtools zip dosfstools
- name: Generate Live Documentation
if: ${{ env.skip != 'true' }}

View File

@ -27,9 +27,8 @@ jobs:
run: javac -version
- name: Install Tools
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install sshpass mtools
- name: Generate Configs, Enums & Live Documentation

View File

@ -29,9 +29,8 @@ jobs:
run: gcc -v
- name: Install multilib
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install gcc-multilib g++-multilib mtools dosfstools zip
- name: Generate Configs, Enums & Live Documentation

View File

@ -18,9 +18,8 @@ jobs:
run: javac -version
- name: Install Tools
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install sshpass
- name: Build TS plugin body

View File

@ -27,9 +27,8 @@ jobs:
- name: Install required software (ubuntu)
if: ${{ matrix.os != 'macos-latest' }}
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install mtools zip dosfstools sshpass lcov valgrind
- name: Install required software (macos)

View File

@ -21,9 +21,8 @@ jobs:
git submodule update --init --depth=1 firmware/controllers/can/wideband_firmware
- name: Install Tools
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install sshpass sshpass mtools
- name: Generate Enum Strings

View File

@ -19,9 +19,8 @@ jobs:
git submodule update --init --depth=1 hardware/rusefi_lib
- name: Install sshpass, kicad, and tk bindings
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo add-apt-repository --yes ppa:kicad/kicad-6.0-releases
sudo apt-get install sshpass kicad python3-pip python3-tk scour librsvg2-bin
pip install python-dateutil pygubu

View File

@ -12,9 +12,8 @@ jobs:
- uses: actions/checkout@v3
- name: Install prerequisite software
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install doxygen graphviz sshpass
- name: Set FTP variables

View File

@ -16,9 +16,8 @@ jobs:
git submodule update --init --depth=1 hardware/InteractiveHtmlBom
- name: Install prerequisite software
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install kicad sshpass
- name: Set SSH variables

View File

@ -26,9 +26,8 @@ jobs:
- name: Install Tools
if: ${{ env.skip != 'true' }}
working-directory: ./.github/workflows/
run: |
sudo ./add-ubuntu-latest-apt-mirrors.sh
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
sudo apt-get install subversion
- name: Update version header in git

View File

@ -0,0 +1,17 @@
#!/usr/bin/env bash
# run as root
[ ! -f /etc/apt/sources.list.bak ] && cp /etc/apt/sources.list /etc/apt/sources.list.bak
for mirror in \
'http://azure.archive.ubuntu.com/ubuntu/' \
'http://ubuntu.osuosl.org/ubuntu/' \
'http://mirrors.ocf.berkeley.edu/ubuntu/' \
; do
sed "s#http:.*?(?=\s)#$mirror#" /etc/apt/sources.list.bak > /etc/apt/sources.list
if apt-get -o Acquire::Retries=3 update; then
exit 0
fi
done
exit 1