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") mdlist=$(ls "$masterdir")
srcdir="../src" srcdir="../src"
langlist=$(ls "$srcdir") langlist=$(ls "$srcdir")
yamlfile="settings.yaml"
filesync=false filesync=false
for overlay in $mdlist; do for overlay in $mdlist; do
board=$(echo "$overlay" | rev | cut -c 4- | rev)
for dirmd in ${langlist[@]}; do for dirmd in ${langlist[@]}; do
if [ -f $srcdir/$dirmd/translate/$overlay ]; then if [ -f $srcdir/$dirmd/translate/$overlay ]; then
if [ -n "$(diff "$masterdir/$overlay" "$srcdir/$dirmd/translate/$overlay" 2> /dev/null)" ]; 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 filesync=true
fi fi
elif ! [ -f $srcdir/$dirmd/overlay/$overlay ]; then elif ! [ -f $srcdir/$dirmd/overlay/$overlay ]; then
echo "copying $overlay to $dirmd/translate/"
cp $masterdir/$overlay $srcdir/$dirmd/translate/ cp $masterdir/$overlay $srcdir/$dirmd/translate/
filesync=true filesync=true
fi 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
done done

View File

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

View File

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

View File

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

View File

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