url probe and fix as part of lang syncing
This commit is contained in:
parent
fc2c79d0cb
commit
c84a0f1519
@ -6,6 +6,20 @@ srcdir="../src"
|
||||
langlist=$(ls "$srcdir")
|
||||
yamlfile="settings.yaml"
|
||||
filesync=false
|
||||
urlfix=false
|
||||
|
||||
confirm() {
|
||||
if [ "$FORCE" == '-y' ]; then
|
||||
true
|
||||
else
|
||||
read -r -p "$1 [y/N] " response < /dev/tty
|
||||
if [[ $response =~ ^(yes|y|Y)$ ]]; then
|
||||
true
|
||||
else
|
||||
false
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
for overlay in $mdlist; do
|
||||
board=$(echo "$overlay" | rev | cut -c 4- | rev)
|
||||
@ -25,11 +39,24 @@ for overlay in $mdlist; do
|
||||
echo "adding $board to $dirmd/$yamlfile"
|
||||
echo "- $board" | tee -a ../src/$dirmd/$yamlfile &> /dev/null
|
||||
fi
|
||||
|
||||
if [ -f "$srcdir/$dirmd/overlay/$overlay" ]; then
|
||||
besturl=$(grep "^url: http" "$masterdir/$overlay")
|
||||
langurl=$(grep "^url: http" "$srcdir/$dirmd/overlay/$overlay")
|
||||
if [ "$besturl" != "$langurl" ]; then
|
||||
echo "url in en $overlay is $besturl"
|
||||
echo "url in $dirmd $overlay is $langurl"
|
||||
if confirm "would you like to fix this discrepancy?"; then
|
||||
sed -i "s|^url.*$|$besturl|" "$srcdir/$dirmd/overlay/$overlay"
|
||||
echo "external link was fixed" && urlfix=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
if ! $filesync;then
|
||||
echo "all pending translations are up-to-date"
|
||||
if ! $filesync && ! $urlfix;then
|
||||
echo "all translations are up-to-date"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
@ -4,6 +4,7 @@ name: I2C
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi I2C Anschlüsse
|
||||
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||
pin:
|
||||
'3':
|
||||
name: Data
|
||||
|
@ -4,6 +4,7 @@ name: SPI
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi SPI Anschlüsse
|
||||
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
|
||||
pincount: 5
|
||||
pin:
|
||||
'11':
|
||||
|
@ -4,6 +4,7 @@ name: UART
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi UART Anschlüsse
|
||||
url: http://elinux.org/RPi_Serial_Connection
|
||||
pin:
|
||||
'8':
|
||||
name: TXD / Senden
|
||||
|
@ -3,7 +3,7 @@
|
||||
name: WiringPi
|
||||
class: interface
|
||||
type: pinout
|
||||
url: http://wiringpi.com/
|
||||
url: http://wiringpi.com
|
||||
page_url: wiringpi
|
||||
pin:
|
||||
'3':
|
||||
|
@ -4,6 +4,7 @@ name: I2C
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Pines de i2c de Rasberry Pi
|
||||
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||
pin:
|
||||
'3':
|
||||
name: Datos
|
||||
|
@ -4,6 +4,7 @@ name: SPI
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Pines SPI Raspberry Pi
|
||||
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
|
||||
pincount: 5
|
||||
pin:
|
||||
'11':
|
||||
|
@ -4,6 +4,7 @@ name: UART
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Pines de UART de la Raspberry Pi
|
||||
url: http://elinux.org/RPi_Serial_Connection
|
||||
pin:
|
||||
'8':
|
||||
name: TXD / Transmitir
|
||||
|
@ -4,6 +4,7 @@ name: I2C
|
||||
class: interface
|
||||
type: pinout
|
||||
description: broches i2c de la Raspberry Pi
|
||||
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||
pin:
|
||||
'3':
|
||||
name: Données
|
||||
|
@ -4,7 +4,7 @@ name: I2C
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi pin i2c
|
||||
type: info
|
||||
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||
pin:
|
||||
'3':
|
||||
name: Dati
|
||||
|
@ -4,6 +4,7 @@ name: SPI
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Pin SPI del Raspberry
|
||||
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
|
||||
pincount: 5
|
||||
pin:
|
||||
'11':
|
||||
|
@ -4,6 +4,7 @@ name: UART
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Pin UART del Raspberry
|
||||
url: http://elinux.org/RPi_Serial_Connection
|
||||
pin:
|
||||
'8':
|
||||
name: TXD / Trasmissione
|
||||
|
@ -4,6 +4,7 @@ name: I2C
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi i2c pinleri
|
||||
url: http://www.raspberry-projects.com/pi/programming-in-python/i2c-programming-in-python/using-the-i2c-interface-2
|
||||
pin:
|
||||
'3':
|
||||
name: Data
|
||||
|
@ -4,6 +4,7 @@ name: SPI
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi SPI pinleri
|
||||
url: https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/
|
||||
pincount: 5
|
||||
pin:
|
||||
'11':
|
||||
@ -61,8 +62,8 @@ wiringpi.mcp23S17Setup(PIN_BASE,SPI_ADDR)
|
||||
# 16 pins including the starting pin
|
||||
mcp23S17pins = range(PIN_BASE,PIN_BASE+15)
|
||||
for pin in mcp23S17pins:
|
||||
wiringpi.pinMode(pin,OUTPUT)
|
||||
wiringpi.digitalWrite(pin,HIGH)
|
||||
wiringpi.pinMode(pin,OUTPUT)
|
||||
wiringpi.digitalWrite(pin,HIGH)
|
||||
```
|
||||
|
||||
SPI portunuz ayrıca Gordon Henderson'un modifiye AVRDude'una Arduino skeçleri yükleyerek ATmega 328'ye "[bit banging](http://en.wikipedia.org/wiki/Bit_banging)" de yapabilirsiniz.
|
||||
|
@ -4,6 +4,7 @@ name: UART
|
||||
class: interface
|
||||
type: pinout
|
||||
description: Raspberry Pi UART pinleri
|
||||
url: http://elinux.org/RPi_Serial_Connection
|
||||
pin:
|
||||
'8':
|
||||
name: TXD / Transmit
|
||||
|
Loading…
Reference in New Issue
Block a user