PDA

View Full Version : Sorry, but how do I run this...



I-Know-Nothing
November 7th, 2009, 05:14 AM
I need to install this, but have no idea how to. Please help me. Thanks.

P.S. The file is "install.sh" and lives /josh/home/desktop. Please tell me exactly what to type. Thanks

P.P.S I'm running Kubuntu 9.04 for the first time.


#!/bin/sh
VERSION="0.9.5"
NAME="mountiso"
FULLNAME="Mount-ISO"
SUDO="sudo"
SU="kdesu"
DE="kde"

SYSTEM="`kde-config --prefix 2>/dev/null`"
LOCAL="`kde-config --localprefix 2>/dev/null`"
DESKTOP="`kde-config --userpath desktop 2>/dev/null`"
# start data extractor prefix
EXTRACT="$HOME/Desktop/$FULLNAME/extracted/usr"
# end data extractor prefix

MENU_HEAD='X-KDE-Submenu=Manage ISO
X-KDE-Submenu[de]=ISO verwalten
X-KDE-Submenu[es]=Gestión ISO
X-KDE-Submenu[it]=Gestione ISO
X-KDE-Submenu[ru]=ISO образ
X-KDE-Submenu[sr]=ISO Менаџер
X-KDE-Submenu[sr@Latn]=ISO Menadžer
X-KDE-Submenu[tr]=ISOları Yönet'

MENU_MOUNT='[Desktop Action MountISOImage]
Icon=cdimage
Name=Mount Image
Name[de]=Image einbinden
Name[es]=Montar imagen
Name[it]=Monta immagine
Name[ru]=Смонтировать образ
Name[sr]=Монтирај ISO
Name[sr@Latn]=Montiraj ISO
Name[tr]=İmajı Bağla'

MENU_UNMOUNT='[Desktop Action UnmountISOImage]
Icon=cdimage
Name=Unmount Image
Name[de]=Image aushängen
Name[es]=Desmontar imagen
Name[it]=Smonta immagine
Name[ru]=Отмонтировать образ
Name[sr]=Демонтирај ISO
Name[sr@Latn]=Demontiraj ISO
Name[tr]=İmajı Ayır'

MENU_CREATEISO='[Desktop Action CreateISOImage]
Icon=cdimage
Name=Create ISO Image
Name[de]=ISO-Image erstellen
Name[es]=Crear imagen ISO
Name[it]=Crea immagine ISO
Name[ru]=Создать ISO-образ
Name[sr]=Направи ISO одраз
Name[sr@Latn]=Napravi ISO odraz
Name[tr]=ISO İmajı Oluştur'

MENU_GRABISO='[Desktop Action GrabISOImage]
Icon=cdimage
Name=Create ISO Image from CD-ROM
Name[de]=ISO-Image von CD-ROM erstellen
Name[es]=Crear imagen ISO desde un CD
Name[it]=Crea immagine ISO dal CDROM
Name[ru]=Создать ISO-образ компакт-диска
Name[sr]=Направи ISO одраз са ЦД-а
Name[sr@Latn]=Napravi ISO odraz sa CD-a
Name[tr]=CD-ROMdan ISO İmajı Oluştur'

MENU_CALC='[Desktop Action CalcMD5Sum]
Icon=cdimage
Name=Calculate MD5 Sum
Name[de]=MD5-Prüfsumme berechnen
Name[es]=Calcular suma MD5
Name[it]=Calcola somma MD5
Name[ru]=Вычислить MD5 сумму
Name[sr]=Израчунај МД5 суму
Name[sr@Latn]=Izračunaj MD5 sumu
Name[tr]=MD5 Özetini Hesapla'

MENU_CONV2ISO='[Desktop Action ConvertCONV2ISO]
Icon=cdimage
Name=Convert to ISO
Name[de]=In ISO umwandeln
Name[es]=Convertir a ISO
Name[it]=Converti in ISO
Name[ru]=Конвертировать в образ ISO
Name[sr]=Конвертуј у ISO
Name[sr@Latn]=Konvertuj u ISO
Name[tr]=ISOya Dönüştür'

MENU_CHECK='[Desktop Action CheckISOType]
Icon=cdimage
Name=Check ISO Type
Name[de]=ISO-Type prüfen
Name[es]=Comprobar tipo de ISO
Name[it]=Controlli il Tipo di ISO
Name[ru]=Проверить тип ISO-образа
Name[sr]=Провери тип ISO одраза
Name[sr@Latn]=Proveri tip ISO odraza
Name[tr]=ISO Türünü Denetle'

DESKTOP_IMG='[Desktop Entry]
Type=MimeType
Patterns=*.img;*.IMG
MimeType=application/x-img
Icon=cdimage
Comment=IMG image file
Comment[az]=IMG əks faylı
Comment[be]=Файл вобразу IMG
Comment[bg]=Файл снимка IMG
Comment[bs]=IMG image datoteka
Comment[ca]=Fitxer d imatge IMG
Comment[cs]=Soubor s IMG obrazem
Comment[cy]=Ffeil delwedd IMG
Comment[da]=IMG billedfil
Comment[de]=IMG-Bilddatei
Comment[el]=Αρχείο εικόνας IMG
Comment[es]=Archivo de imagen IMG
Comment[et]=IMG tõmmisefail
Comment[eu]=IMG irudia fitxategia
Comment[fa]=پرونده*ی IMG
Comment[fi]=IMG binäärikuva
Comment[fr]=Image IMG
Comment[ga]=Comhad íomhá IMG
Comment[gl]=Ficheiro de imaxe IMG
Comment[he]=קובץ מראה של IMG
Comment[hi]=IMG चित्र फाइल
Comment[hu]=IMG-képmásfájl
Comment[is]=IMG diskmynd
Comment[it]=File immagine IMG
Comment[ja]=IMG イメージ ファイル
Comment[lt]=IMG atvaizdo byla
Comment[mn]=IMG хэв файл
Comment[nb]=IMG bildefil
Comment[nds]=IMG-Bilddatei
Comment[nl]=IMG-beeldbestand
Comment[nn]=IMG-biletfil
Comment[pl]=Plik obrazu systemu plików IMG
Comment[pt]=Ficheiro com imagem IMG
Comment[pt_BR]=Imagem IMG
Comment[ro]=Fişier imagine IMG
Comment[ru]=Файл образа IMG
Comment[se]=IMG-govvafiila
Comment[sk]=Obraz disku IMG
Comment[sl]=Podoba plošče IMG
Comment[sr]=Фајл IMG одраза
Comment[sr@Latn]=Fajl IMG odraza
Comment[sv]=IMG-avbildsfil
Comment[ta]=IMG உருக் கோப்பு
Comment[tg]=Файли тасвири IMG
Comment[tr]=IMG Dosyası
Comment[uk]=Файл образу IMG
Comment[uz]=IMG-тасвир файли
Comment[wa]=Fitchî imådje IMG
Comment[xx]=xxIMG image filexx
Comment[zh_CN]=IMG 映像文件
Comment[zh_TW]=IMG 映像檔案'

# -------------------------------------------------------------------------
function check_env {
# parameters:
# - $1 = Description
# - $2 = Default location
# - $3 = Fallback
# -------------------------------------------------------------------------

if ( test -d "$2" ) then
DIR="$2"
elif ( test -d "$3" ) then
DIR="$3"
else
echo
while ( test ! -d "$DIR" )
do
echo "Couldn't find $1!"
echo -n "Type the full path here or press \"Ctrl+C\" to abort: "
read DIR
done
fi
DIR="$DIR"
echo -e "* $1: \E[33m$DIR\E[m"

....(it goes on)

Ann.A
November 7th, 2009, 05:26 AM
This is probably more a beginner's forum question, but to run a bash script you need to make sure it is executable:

sudo chmod +x /home/josh/desktop/install.sh

And then run it from its location:

sudo /home/josh/desktop/install.sh

lavinog
November 7th, 2009, 09:10 AM
Do you know why you want to run this script?

geirha
November 7th, 2009, 11:35 AM
That's a poorly written script riddled with bashism (https://wiki.ubuntu.com/DashAsBinSh). It might work better if you change the first line to read
#!/bin/bash

Oh and do NOT run it with sudo unless the documentation specifies that it is designed to be run with sudo.