내 다음 스크립트는 그것에 대해 '다음'파일 종료 전에 키워드가. 내가 오류를 찾을 수 없습니다 기대 불평 (에러를 생산하고있다. 당신은 시간이 있으면 도와주세요.bash 스크립트가 EOF 오류 후 올바르게 종료되지 않습니다 (예상).
것은, 감사 유카
스크립트가 작동#!/bin/sh
#Makes the /usr/lib/jvm in case...
sudo mkdir -p /usr/lib/jvm;
sudo mkdir /org-thejarbar-work-dir;
cd /org-thejarbar-work-dir;
#Update this line to reflect newer versions of JDK...
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.tar.gz;
#Extract the download
tar -xvf ./*gz;
#Move it to where it can be found...
sudo mv ./* /usr/lib/jvm/;
sudo ln -s /usr/lib/jvm/jdk1*/bin/java /usr/bin/;
sudo rm -rf /org-thejarbar-work-dir;
#Makes the /usr/lib/maven in case...
sudo mkdir -p /usr/lib/maven;
sudo mkdir /org-thejarbar-work-dir;
cd /org-thejarbar-work-dir;
#Update this line to reflect newer versions of maven
wget http://mirrors.powertech.no/www.apache.org/dist//maven/binaries/apache-maven-3.0.3-bin.tar.gz;
tar -xvf ./*gz;
#Move it to a more logical location
sudo mv ./* /usr/lib/maven/;
#If you have Maven on Windows and use VirtualBox, you can set up the maven to be a virtualbox shared folder.
#The name must match the name used below (ignore if irrelevant to you).
sudo mount -t vboxsf maven /usr/lib/maven;
#Link the new Maven to the bin...
sudo ln -s /usr/lib/maven/apache-maven-*/bin/mvn /usr/bin/;
sudo rm -rf /org-thejarbar-work-dir;
sudo mkdir /org-thejarbar-work-dir;
cd /org-thejarbar-work-dir;
#Update this line to reflect newer versions of Netbeans or replace 'javase' with 'javaee' or add Java EE manually via
#Netbeans 'plugins as needed.
wget http://download.netbeans.org/netbeans/7.0.1/final/bundles/netbeans-7.0.1-ml-javase-linux.sh;
sh //*sh;
sudo mv ./* /usr/lib/ide/;
#Add Netbeans launcher to your PATH. Doing so allows you to run 'netbeans' command from the terminal
sudo ln -s /usr/lib/ide/netbeans-7*/bin/netbeans /usr/bin/;
#If you use VirtualBox , you can share your projects between Host and guest. Name of shared
#folder must match 'NetBeansProjects' Remove this if you don't need...
if [ ! -d "~/NetBeansProjects" ]; then
sudo mkdir ~/NetBeansProjects;
fi
sudo mount -t vboxsf NetBeansProjects ~/NetBeansProjects;
sudo rm -rf /org-thejarbar-work-dir;
sudo mkdir /org-thejarbar-work-dir;
cd /org-thejarbar-work-dir;
#Update this line to reflect newer versions of Netbeans or replace 'javase' with 'javaee' or add Java EE manually via
#Netbeans 'plugins as needed.
wget http://download.netbeans.org/netbeans/7.0.1/final/bundles/netbeans-7.0.1-ml-javase-linux.sh;
sh //*sh;
sudo mv ./* /usr/lib/ide/;
#Add Netbeans launcher to your PATH. Doing so allows you to run 'netbeans' command from the terminal
sudo ln -s /usr/lib/ide/netbeans-7*/bin/netbeans /usr/bin/;
#If you use VirtualBox , you can share your projects between Host and guest. Name of shared
#folder must match 'NetBeansProjects' Remove this if you don't need...
if [ ! -d "~/NetBeansProjects" ]; then
sudo mkdir ~/NetBeansProjects;
fi
sudo mount -t vboxsf NetBeansProjects ~/NetBeansProjects;
sudo rm -rf /org-thejarbar-work-dir;
sudo mkdir /org-thejarbar-work-dir;
cd /org-thejarbar-work-dir;
sudo wget http://download-ln.jetbrains.com/idea/ideaIC-11.tar.gz
sudo tar -zxvf ./*.gz;
#Move it to a better location...
sudo rm -rf /usr/lib/ide/idea-IC*;
sudo mv ./* /usr/lib/ide/;
#Add IDEA launcher to your PATH. Doing so allows you to run 'idea.sh' command from the terminal
rm /usr/bin/idea.sh;
sudo ln -s /usr/lib/ide/idea-IC*/bin/idea.sh /usr/bin/;
#If you use VirtualBox , you can share your projects between Host and guest. Name of shared
#folder must match 'IdeaProjects' Remove this if you don't need...
if [ ! -d "~/IdeaProjects" ]; then
sudo mkdir ~/IdeaProjects;
fi
sudo rm -rf /org-thejarbar-work-dir;
exit 0;
주 (필요한 것을 않습니다)하지만 오류가. 내가 오류를 방지하기 위해 노력하고 내가 다른 사람에게이 스크립트를 공유 일하고으로 귀찮은입니다. 모든
쉘을 게시 할 수 있습니까 (예 :'ls -l/bin/sh'의 출력)? 스크립트가 내 컴퓨터에서 제대로 작동하는 것 같습니다. – phihag
이것은 문제를 해결하지 않지만 ";" 각 명령 줄의 끝에서 필요하지 않습니다. 동일한 행에서 여러 명령을 실행하려는 경우에 사용됩니다. 나는 코드를 작성한 직후에 특히 잘하고있다. – Rob
@phihag 출력 : yucca-VirtualBox : ~ $ ls -l/bin/sh lrwxrwxrwx 1 루트 루트 4 2011-12-12 09:47/bin/sh -> 대시 – thejartender