secours-catholique

Des scripts pour aider à l'installation des postes en libre service du secours catholique de calais - retour accueil

git clone git://bebou.netlib.re/secours-catholique
Log | Files | Refs |

commit 7ed1cb0b7db12fb489f17dfbb1323f9aa2f8fb7d
parent 470f0408f2260267764c17b1308104f2e3216eeb
Auteurice: Arthur Pons <arthur.pons@unistra.fr>
Date:   Wed, 12 Feb 2025 17:03:27 +0100

Tentative de contourner le souci d'encodage

Diffstat:
Mmakeconf | 24++++++++++++------------
Mmakeuserfile | 3++-
2 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/makeconf b/makeconf @@ -23,14 +23,14 @@ for folder in $(find /home -maxdepth 2 -type d | grep -E "(Desktop|Bureau)$");do done printf "création des comptes\n" -adduser --allow-all-names --disabled-password --comment "" "لهجة-سودانية" || echo "compte existe probablement déjà" -passwd -d "لهجة-سودانية" -adduser --allow-all-names --disabled-password --comment "" "لهجات-سوريا" || echo "compte existe probablement déjà" -passwd -d "لهجات-سوريا" -adduser --allow-all-names --disabled-password --comment "" "پښتو" || echo "compte existe probablement déjà" -passwd -d "پښتو" -adduser --allow-all-names --disabled-password --comment "" "فارسی" || echo "compte existe probablement déjà" -passwd -d "فارسی" +adduser --allow-all-names --disabled-password --comment "" "ar_sd_لهجة-سودانية" || echo "compte existe probablement déjà" +passwd -d "ar_sd_لهجة" +adduser --allow-all-names --disabled-password --comment "" "ar_sy_لهجات-سوريا" || echo "compte existe probablement déjà" +passwd -d "ar_sy_لهجات" +adduser --allow-all-names --disabled-password --comment "" "ps_af_پښتو" || echo "compte existe probablement déjà" +passwd -d "ps_af_پښتو" +adduser --allow-all-names --disabled-password --comment "" "fa_ir_فارسی" || echo "compte existe probablement déjà" +passwd -d "fa_ir_فارسی" adduser --allow-all-names --disabled-password --comment "" "france" || echo "compte existe probablement déjà" passwd -d france adduser --allow-all-names --disabled-password --comment "" "uk" || echo "compte existe probablement déjà" @@ -43,10 +43,10 @@ grep -q "^indicators" /etc/lightdm/lightdm-gtk-greeter.conf \ printf "Edition des fichiers des comptes (ne sert à rien ? :( )\n" dir="/var/lib/AccountsService" -printf "ﻞﻬﺟﺓ-ﺱﻭﺩﺎﻨﻳﺓ ar_SD.UTF8 icon.sudan.png $dir -ﻞﻬﺟﺎﺗ-ﺱﻭﺮﻳﺍ ar_SY.UTF8 icon.syria.png $dir -ﭖښﺕﻭ ps_AF.UTF8 icon.afghanistan.png $dir -ﻑﺍﺮﺴﯾ fa_IR.UTF8 icon.iran.png $dir +printf "ar_sd ar_SD.UTF8 icon.sudan.png $dir +ar_sy ar_SY.UTF8 icon.syria.png $dir +ps_af ps_AF.UTF8 icon.afghanistan.png $dir +fa_ir fa_IR.UTF8 icon.iran.png $dir france fr_FR.UTF8 icon.france.png $dir uk en_GB.UTF8 icon.uk.png $dir" | xargs -n4 sudo ./makeuserfile diff --git a/makeuserfile b/makeuserfile @@ -1,6 +1,7 @@ #! /bin/sh name="$1";locale="$2";icon="$3";dir="$4" +homefolder=$(find /home -mindepth 1 -maxdepth 1 -type d | grep "$name") <<-. cat > "$dir/users/$name" [org.freedesktop.DisplayManager.AccountsService] BackgroundFile='/usr/share/images/desktop-base/desktop-background' @@ -13,7 +14,7 @@ Icon=$dir/icons/$icon SystemAccount=false . -<<. cat > "/home/$name/.xsessionrc" +<<. cat > "$homefolder/.xsessionrc" LC_ALL=$locale export GDM_LANG=$locale export LANG=$locale