mabox-tools/bin/mabox-langfiles

16 lines
375 B
Bash
Executable File

#!/bin/bash
#
# Copy i18n files to ~ if available
# Run only once invoked from openbox autostart
LNG=${LANG:0:2}
FILE="$HOME/.config/mabox/.lang"
if [ ! -f "$FILE" ]; then
if [ -d "/usr/share/mabox/lang/$LNG" ]; then
rsync -a /usr/share/mabox/lang/$LNG/ $HOME/
else
rsync -a /usr/share/mabox/lang/en/ $HOME/
fi
touch $HOME/.config/mabox/.lang
fi