syncing picon-zero changes to translate folders

This commit is contained in:
RogueM 2016-10-23 15:35:42 +01:00
parent 302b243676
commit 9877d0186e
5 changed files with 19 additions and 4 deletions

View File

@ -4,9 +4,11 @@ masterdir="../src/en/overlay"
mdlist=$(ls "$masterdir")
srcdir="../src"
langlist=$(ls "$srcdir")
yamlfile="settings.yaml"
filesync=false
for overlay in $mdlist; do
board=$(echo "$overlay" | rev | cut -c 4- | rev)
for dirmd in ${langlist[@]}; do
if [ -f $srcdir/$dirmd/translate/$overlay ]; then
if [ -n "$(diff "$masterdir/$overlay" "$srcdir/$dirmd/translate/$overlay" 2> /dev/null)" ]; then
@ -15,9 +17,14 @@ for overlay in $mdlist; do
filesync=true
fi
elif ! [ -f $srcdir/$dirmd/overlay/$overlay ]; then
echo "copying $overlay to $dirmd/translate/"
cp $masterdir/$overlay $srcdir/$dirmd/translate/
filesync=true
fi
if ! grep -e $board ../src/$dirmd/$yamlfile &> /dev/null; then
echo "adding $board to $dirmd/$yamlfile"
echo "- $board" | tee -a ../src/$dirmd/$yamlfile &> /dev/null
fi
done
done

View File

@ -12,7 +12,6 @@ buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=552
pincount: 40
eeprom: no
power:
'1':
'2':
ground:
'6':
@ -28,6 +27,9 @@ pin:
mode: i2c
'5':
mode: i2c
'38':
name: Ultrasonic
mode: input/output
i2c:
'0x22':
name: PiconZero

View File

@ -12,7 +12,6 @@ buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=552
pincount: 40
eeprom: no
power:
'1':
'2':
ground:
'6':
@ -28,6 +27,9 @@ pin:
mode: i2c
'5':
mode: i2c
'38':
name: Ultrasonic
mode: input/output
i2c:
'0x22':
name: PiconZero

View File

@ -12,7 +12,6 @@ buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=552
pincount: 40
eeprom: no
power:
'1':
'2':
ground:
'6':
@ -28,6 +27,9 @@ pin:
mode: i2c
'5':
mode: i2c
'38':
name: Ultrasonic
mode: input/output
i2c:
'0x22':
name: PiconZero

View File

@ -12,7 +12,6 @@ buy: http://4tronix.co.uk/store/index.php?rt=product/product&product_id=552
pincount: 40
eeprom: no
power:
'1':
'2':
ground:
'6':
@ -28,6 +27,9 @@ pin:
mode: i2c
'5':
mode: i2c
'38':
name: Ultrasonic
mode: input/output
i2c:
'0x22':
name: PiconZero