aboutsummaryrefslogtreecommitdiff
path: root/mule/mule.sh
diff options
context:
space:
mode:
Diffstat (limited to 'mule/mule.sh')
-rwxr-xr-xmule/mule.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/mule/mule.sh b/mule/mule.sh
index b05099f..18cf3f5 100755
--- a/mule/mule.sh
+++ b/mule/mule.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
SYSFSPATH=/sys/class/gpio
@@ -25,7 +25,8 @@ usage() {
gpiosetup() {
for PIN in ${RESET_PIN},${RESET_INVERT} ${BOOT0_PIN},${BOOT0_INVERT}
do
- IFS=',' read PINNUM INVERT <<< "${PIN}"
+ PINNUM=$(echo "$PIN" | cut -d',' -f1)
+ INVERT=$(echo "$PIN" | cut -d',' -f2)
if [ ! -d ${SYSFSPATH}/gpio${PINNUM} ] ; then
echo ${PINNUM} > ${SYSFSPATH}/export
fi