rendered paste body$ sh /usr/local/bin/screen_orientation
/usr/local/bin/screen_orientation: 34: Syntax error: "fi" unexpected (expecting "then")
==============================================
#!/bin/sh
# Change System Input orientation for Tablet Mode
# Created by Sebastian Henschel for Toshiba m200
# Modified by Justin "Linuturk@gmail.com" Phelps on 9/24/2007
# to work with Ubuntu 7.04 Satellite R15-S822
# Depends on wacom-tools from repo
#
# 9/24/2007
# Copied original from http://tuxmobil.org/toshiba_portege_m200_tablet_linux.html
# Modified to include the stylus orientation change.
# Change keycodes to match buttons on R15-S822
#
# Make executable and move to /usr/local/bin
#
orientation=`/usr/bin/X11/xrandr --query | /bin/grep "Current rotation" | /usr/bin/awk '{print $4}'`
# echo $orientation
if [ "$orientation" == "normal" ]; then
/usr/bin/xrandr -o right
/usr/bin/xsetwacom set stylus Rotate CCW
/usr/bin/xmodmap -e "keycode 10 = KP_Left"
/usr/bin/xmodmap -e "keycode 12 = KP_Up"
/usr/bin/xmodmap -e "keycode 11 = KP_Right"
/usr/bin/xmodmap -e "keycode 13 = KP_Down"
/usr/bin/xmodmap -e "keycode 14 = KP_Enter"
else
/usr/bin/xrandr -o normal
/usr/bin/xsetwacom set stylus Rotate none
/usr/bin/xmodmap -e "keycode 11 = 2 quotedbl twosuperior oneeighth twosuperior oneeighth"
/usr/bin/xmodmap -e "keycode 13 = 4 dollar onequarter currency onequarter currency"
/usr/bin/xmodmap -e "keycode 10 = 1 exclam onesuperior exclamdown onesuperior exclamdown"
/usr/bin/xmodmap -e "keycode 12 = 3 section threesuperior sterling threesuperior sterling"
/usr/bin/xmodmap -e "keycode 14 = 5 percent onehalf threeeighths onehalf threeeighths"
fi