dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

printgeo (547B)


      1 #!/bin/sh
      2 # requirements: samba
      3 
      4 die() {
      5 	printf '%s: error: %s\n' "${0##*/}" "$1" >&2
      6 	exit 1
      7 }
      8 
      9 usage() {
     10 	printf 'usage: %s [-h] file ...\n' "${0##*/}"
     11 }
     12 
     13 while :; do
     14 	case "$1" in
     15 		-h)
     16 			usage
     17 			exit 0;;
     18 		--) # end all options
     19 			shift
     20 			break;;
     21 		-?*)
     22 			die "unknown option specified: $1";;
     23 		*)  # No more options
     24 			break
     25 	esac
     26 	shift
     27 done
     28 
     29 if [ $# -lt 1 ]; then
     30 	usage
     31 	exit 1
     32 fi
     33 
     34 pass="$(pass Uni/mit.au.dk-217756)"
     35 for f in "$@"; do
     36 	smbclient //prt11.uni.au.dk/1672-129-c-1 \
     37 		-U "au217756%${pass}" -W uni \
     38 		-c "print $f"
     39 done