Skip to content

Commit 0739894

Browse files
committed
corrections des scripts pour mise en place du build via github actions
1 parent 275aa51 commit 0739894

13 files changed

Lines changed: 31 additions & 24 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Configuration locale
22
.env.local
33

4+
# Build artifacts
5+
/dist/
6+
47
# Logs
58
*.log
69
update.log

build.sh

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22

33
set -euo pipefail
44

@@ -23,9 +23,23 @@ compile_script() {
2323
local script_path="$1"
2424
local base
2525
base="$(basename "${script_path}")"
26-
# shc génère <base>.x et <base>.x.c; on place le binaire final dans dist/<base>
27-
shc -f "${script_path}" -o "${DIST_DIR}/${base}" >/dev/null
28-
rm -f "${DIST_DIR}/${base}.x.c" "${DIST_DIR}/${base}.x" 2>/dev/null || true
26+
local out="${DIST_DIR}/${base}"
27+
28+
# shc crée le binaire et des fichiers temporaires
29+
# On ignore les warnings et on nettoie après
30+
shc -f "${script_path}" -i /bin/bash -o "${out}" 2>/dev/null || true
31+
32+
# Nettoyer les fichiers générés non-utiles
33+
rm -f "${out}.x.c" "${out}.x" 2>/dev/null || true
34+
35+
# Vérifier que le binaire existe
36+
if [ -f "${out}" ]; then
37+
chmod +x "${out}"
38+
return 0
39+
else
40+
echo "Erreur: ${script_path} n'a pas pu être compilé" >&2
41+
return 1
42+
fi
2943
}
3044

3145
for script in "${SRC_DIR}"/*.sh; do

src/app.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22

33
set -e
44

src/dotfiles.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22

33
set -e
44

src/init.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22

33
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44
PACKAGES_CONF="${SCRIPT_DIR}/packages.conf"

src/init_conf_macOs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22

33
echo "Configuration de OSX…"
44

src/init_conf_windows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22

33
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44
PACKAGES_CONF="${SCRIPT_DIR}/packages.conf"

src/install_fonts.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22
echo "Installation des fonts…"
33
brew tap homebrew/cask-fonts
44
FONTS=(

src/packages.conf

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,41 +31,31 @@ brew|node|nodejs|Node.js
3131
brew|pandoc|pandoc|Pandoc
3232
brew|nmap|nmap|Network mapper
3333
brew|openjdk|openjdk|OpenJDK
34-
brew|parallel|parallel|GNU Parallel
35-
brew|testdisk|testdisk|TestDisk
3634
brew|wget|wget|Wget
3735
brew|wireguard-tools|-|WireGuard tools
3836
brew|curl|-|Curl
3937

4038
# Applications (cask pour macOS, choco pour Windows)
4139
cask|appcleaner|-|AppCleaner
4240
cask|bruno|bruno|Bruno API client
43-
cask|chatgpt|-|ChatGPT
4441
cask|cryptomator|cryptomator|Cryptomator
4542
cask|docker|docker-desktop|Docker
4643
cask|firefox|firefox|Firefox
4744
cask|keepassxc|keepassxc|KeePassXC (inclut keepassxc-cli)
48-
cask|keeweb|-|KeeWeb
4945
cask|keka|7zip|Archive tool
5046
cask|macfuse|-|macFUSE
51-
cask|notion|notion|Notion
5247
cask|obsidian|obsidian|Obsidian
5348
cask|onedrive|onedrive|OneDrive
54-
cask|onyx|-|OnyX
55-
cask|postman|postman|Postman
5649
cask|signal|signal|Signal
5750
cask|rectangle|-|Rectangle
5851
cask|teamviewer|teamviewer|TeamViewer
5952
cask|the-unarchiver|-|The Unarchiver
60-
cask|thunderbird|thunderbird|Thunderbird
6153
cask|transmission|transmission|Transmission
6254
cask|veracrypt|veracrypt|VeraCrypt
6355
cask|visual-studio-code|vscode|Visual Studio Code
6456
cask|vlc|vlc|VLC
65-
cask|linearmouse|-|LinearMouse
6657
cask|synology-drive|-|Synology Drive
6758
cask|tor-browser|tor-browser|Tor Browser
68-
cask|spotube|-|Spotube
6959
cask|steam|steam|Steam
7060
cask|nvidia-geforce-now|nvidia-geforce-now|GeForce NOW
7161

src/setup_auto_update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/bin/bash
22

33
echo "Configuration de la mise à jour automatique quotidienne à 21h00"
44

0 commit comments

Comments
 (0)