new updater script (#5132)
This commit is contained in:
parent
4b8e5cd451
commit
e46a3f2376
|
@ -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
|
|
|
@ -23,9 +23,8 @@ jobs:
|
||||||
java-version: '8'
|
java-version: '8'
|
||||||
|
|
||||||
- name: Install Tools
|
- name: Install Tools
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
run: |
|
||||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
|
||||||
sudo apt-get install mtools
|
sudo apt-get install mtools
|
||||||
|
|
||||||
- name: Generate Configs, Enums & Live Documentation
|
- name: Generate Configs, Enums & Live Documentation
|
||||||
|
|
|
@ -359,12 +359,9 @@ jobs:
|
||||||
|
|
||||||
- name: Install multilib, mingw, sshpass and mtools
|
- name: Install multilib, mingw, sshpass and mtools
|
||||||
if: ${{ env.skip != 'true' }}
|
if: ${{ env.skip != 'true' }}
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
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 g++-mingw-w64 gcc-mingw-w64 sshpass mtools
|
sudo apt-get install gcc-multilib g++-multilib g++-mingw-w64 gcc-mingw-w64 sshpass mtools zip dosfstools
|
||||||
sudo apt-get install zip
|
|
||||||
sudo apt-get install dosfstools
|
|
||||||
|
|
||||||
- name: Generate Live Documentation
|
- name: Generate Live Documentation
|
||||||
if: ${{ env.skip != 'true' }}
|
if: ${{ env.skip != 'true' }}
|
||||||
|
|
|
@ -27,9 +27,8 @@ jobs:
|
||||||
run: javac -version
|
run: javac -version
|
||||||
|
|
||||||
- name: Install Tools
|
- name: Install Tools
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
run: |
|
||||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
|
||||||
sudo apt-get install sshpass mtools
|
sudo apt-get install sshpass mtools
|
||||||
|
|
||||||
- name: Generate Configs, Enums & Live Documentation
|
- name: Generate Configs, Enums & Live Documentation
|
||||||
|
|
|
@ -29,9 +29,8 @@ jobs:
|
||||||
run: gcc -v
|
run: gcc -v
|
||||||
|
|
||||||
- name: Install multilib
|
- name: Install multilib
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
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
|
sudo apt-get install gcc-multilib g++-multilib mtools dosfstools zip
|
||||||
|
|
||||||
- name: Generate Configs, Enums & Live Documentation
|
- name: Generate Configs, Enums & Live Documentation
|
||||||
|
|
|
@ -18,9 +18,8 @@ jobs:
|
||||||
run: javac -version
|
run: javac -version
|
||||||
|
|
||||||
- name: Install Tools
|
- name: Install Tools
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
run: |
|
||||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
|
||||||
sudo apt-get install sshpass
|
sudo apt-get install sshpass
|
||||||
|
|
||||||
- name: Build TS plugin body
|
- name: Build TS plugin body
|
||||||
|
|
|
@ -27,9 +27,8 @@ jobs:
|
||||||
|
|
||||||
- name: Install required software (ubuntu)
|
- name: Install required software (ubuntu)
|
||||||
if: ${{ matrix.os != 'macos-latest' }}
|
if: ${{ matrix.os != 'macos-latest' }}
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
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
|
sudo apt-get install mtools zip dosfstools sshpass lcov valgrind
|
||||||
|
|
||||||
- name: Install required software (macos)
|
- name: Install required software (macos)
|
||||||
|
|
|
@ -21,9 +21,8 @@ jobs:
|
||||||
git submodule update --init --depth=1 firmware/controllers/can/wideband_firmware
|
git submodule update --init --depth=1 firmware/controllers/can/wideband_firmware
|
||||||
|
|
||||||
- name: Install Tools
|
- name: Install Tools
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
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
|
sudo apt-get install sshpass sshpass mtools
|
||||||
|
|
||||||
- name: Generate Enum Strings
|
- name: Generate Enum Strings
|
||||||
|
|
|
@ -19,9 +19,8 @@ jobs:
|
||||||
git submodule update --init --depth=1 hardware/rusefi_lib
|
git submodule update --init --depth=1 hardware/rusefi_lib
|
||||||
|
|
||||||
- name: Install sshpass, kicad, and tk bindings
|
- name: Install sshpass, kicad, and tk bindings
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
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 add-apt-repository --yes ppa:kicad/kicad-6.0-releases
|
||||||
sudo apt-get install sshpass kicad python3-pip python3-tk scour librsvg2-bin
|
sudo apt-get install sshpass kicad python3-pip python3-tk scour librsvg2-bin
|
||||||
pip install python-dateutil pygubu
|
pip install python-dateutil pygubu
|
||||||
|
|
|
@ -12,9 +12,8 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install prerequisite software
|
- name: Install prerequisite software
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
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
|
sudo apt-get install doxygen graphviz sshpass
|
||||||
|
|
||||||
- name: Set FTP variables
|
- name: Set FTP variables
|
||||||
|
|
|
@ -16,9 +16,8 @@ jobs:
|
||||||
git submodule update --init --depth=1 hardware/InteractiveHtmlBom
|
git submodule update --init --depth=1 hardware/InteractiveHtmlBom
|
||||||
|
|
||||||
- name: Install prerequisite software
|
- name: Install prerequisite software
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
run: |
|
||||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
|
||||||
sudo apt-get install kicad sshpass
|
sudo apt-get install kicad sshpass
|
||||||
|
|
||||||
- name: Set SSH variables
|
- name: Set SSH variables
|
||||||
|
|
|
@ -26,9 +26,8 @@ jobs:
|
||||||
|
|
||||||
- name: Install Tools
|
- name: Install Tools
|
||||||
if: ${{ env.skip != 'true' }}
|
if: ${{ env.skip != 'true' }}
|
||||||
working-directory: ./.github/workflows/
|
|
||||||
run: |
|
run: |
|
||||||
sudo ./add-ubuntu-latest-apt-mirrors.sh
|
sudo bash misc/actions/add-ubuntu-latest-apt-mirrors.sh
|
||||||
sudo apt-get install subversion
|
sudo apt-get install subversion
|
||||||
|
|
||||||
- name: Update version header in git
|
- name: Update version header in git
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue