/ Published in: Bash
Pequeño bash para Intype instalado en Ubuntu con Wine
Expand |
Embed | Plain Text
#!/bin/bash #intype='env WINEPREFIX="/home/otakurzo/.wine" wine C:\\Program\ Files\\Intype\\intype.exe' intype='env WINEPREFIX="'$HOME'/.wine" wine C:\\Program\ Files\\Intype\\intype.exe' #params=$* params=$@ newfile='' # si recibio 1 parametro if [ $# -eq 1 ]; then param=$1 # verifica si intenta abrir la ruta actual con "." if [ "$param" == '.' ]; then param="-p \"$(pwd)\"" # si es un directorio elif [ -d "$param" ]; then param="-p \"$param\"" #si no es un archivo elif [ ! -f "$param" ]; then #echo Error de argumento: \""$1"\" no es un archivo o directorio. #exit newfile="$param" touch "$param" param=\""$param"\" fi params=$param fi #echo "eval "$intype" "$params"" eval "$intype" "$params" if [ "$newfile" != '' ]; then filesize=`stat -c %s "$newfile"` if [ $filesize -eq 0 ]; then unlink "$newfile" #rm "$newfile" fi fi
Comments
Subscribe to comments
You need to login to post a comment.

sudo mv intype.sh /bin/intypeusage:intypeintype .#open project folderintype file.html#open file (If not exists is created).