1
0

server.js --> server.js + public/autopost.js + views/autopost.html

This commit is contained in:
unfr
2025-08-14 19:27:48 +02:00
parent 0936b690ec
commit 8abff0fb6c
5 changed files with 962 additions and 957 deletions

View File

@@ -51,6 +51,8 @@ install_bin() { # install_bin <src> <dst>
log "Initialisation des dossiers"
ensure_dir "$BIN_DIR"
ensure_dir "$AUTOPOST_DIR"
ensure_dir "$AUTOPOST_DIR"/public
ensure_dir "$AUTOPOST_DIR"/views
ensure_dir "$BASH_COMPLETION_DIR"
# Ensure PATH contains $HOME/bin for this session & future shells
@@ -328,6 +330,8 @@ popd >/dev/null
log "Vérification fichiers Node"
[ -f "$AUTOPOST_DIR/server.js" ] || wget -q -O "$AUTOPOST_DIR/server.js" "https://tig.unfr.pw/UNFR/postauto/raw/branch/main/autopost/server.js"
[ -f "$AUTOPOST_DIR/db.js" ] || wget -q -O "$AUTOPOST_DIR/db.js" "https://tig.unfr.pw/UNFR/postauto/raw/branch/main/autopost/db.js"
[ -f "$AUTOPOST_DIR/public/autopost.js" ] || wget -q -O "$AUTOPOST_DIR/public/autopost.js" "https://tig.unfr.pw/UNFR/postauto/raw/branch/main/autopost/public/autopost.js"
[ -f "$AUTOPOST_DIR/views/autopost.html" ] || wget -q -O "$AUTOPOST_DIR/views/autopost.html" "https://tig.unfr.pw/UNFR/postauto/raw/branch/main/autopost/views/autopost.html"
if [ ! -f "$AUTOPOST_DIR/config.js" ]; then
wget -q -O "$AUTOPOST_DIR/config.js" "https://tig.unfr.pw/UNFR/postauto/raw/branch/main/autopost/config.js"
ok "Installation terminée. Configurez $AUTOPOST_DIR/config.js."