Installer issue

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Installer issue
# 1  
Old 02-21-2016
Installer issue

Hi, I have a little problem with an Installer.

In my script I have a section that place a keyboard shortcut:
Code:
#!/usr/bin/perl
################################################################################
#
# Create Desktop shortcut for Swedish Menu Commands Document
#
################################################################################
$swedishKeyboardDocPath1 = $APPSUPPORT_PATH."/Finale Extra/PrintMusic 2014 Menykommandon.pdf";
$swedishKeyboardShortcut1 = $ENV{"HOME"}."/Desktop/PrintMusic 2014 Menykommandon.pdf";
if ( -e $swedishKeyboardDocPath1 ) {
    symlink($swedishKeyboardDocPath1, $swedishKeyboardShortcut1);
}

When I install this and there already exist a shortcut with the same name, I want the installer to replace it.
I hope I get some help from the forum.
/peli

Last edited by Don Cragun; 02-21-2016 at 03:32 PM.. Reason: Add CODE tags.
# 2  
Old 02-21-2016
Trying to create a symbolic link will fail if the name of the symlink to be created already exists. Try this instead:
Code:
#!/bin/ksh
################################################################################
#
# Create Desktop shortcut for Swedish Menu Commands Document
#
################################################################################
swedishKeyboardDocPath1="$APPSUPPORT_PATH/Finale Extra/PrintMusic 2014 Menykommandon.pdf"
swedishKeyboardShortcut1=~"/Desktop/PrintMusic 2014 Menykommandon.pdf"
if [ -e "$swedishKeyboardDocPath1" ]
then	rm -f "$swedishKeyboardShortcut1"
	ln -s "$swedishKeyboardDocPath1" "$swedishKeyboardShortcut1"
else	printf '%s: "%s" not found.\n' "${0##*/}" "$swedishKeyboardDocPath1"
	exit 1
fi

Note, however, that this will not work unless APPSUPPORT_PATH is an exported variable in your environment when you invoke this script.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Yet another simple script installer

Heyas Just recently i tried to apply the GNU Autotools to my project, while it was possible, it took forever to know where to create which files and what to place in each of them. Dare you making a space rather than a tab! Inspired by GNU Autotools, and overhelmed by its functionality and... (0 Replies)
Discussion started by: sea
0 Replies

2. Solaris

OpenSolaris Installer error

Hi, Whenever i try to install OpenSolaris, I am getting the error "There was an error launching the application. Detail: Failed to fork child process (Not enough space)" I am using the image 2009.06. I have 512 mb ram and 100 gb hard drive with Red Hat and Windows Xp installed. Please... (1 Reply)
Discussion started by: krabu
1 Replies

3. Red Hat

If I want to create such Installer (Not RPM)

Hi All, I had created a installer (RPM), but later I came across that Netbeans (netbeans-6.9-ml-linux), Flex Builder Linux Alpha (flexbuilder_linux_install_a4_081408.bin) and JDK (jdk-6u20-linux-i586-rpm.bin) dont provide any RPM but they provide a huge binary executable shell script. My... (0 Replies)
Discussion started by: jw_amp
0 Replies

4. Solaris

solaris installer

what is the name of the solaris installer? (for both x86 and sparc architecture) In linux it is "anaconda". (7 Replies)
Discussion started by: kingston
7 Replies

5. Fedora

wubi installer for windows

hello.i need a soft like (wubi support ubuntu) to boot fedora or centos or freebsd.any answer ? Thank You. (2 Replies)
Discussion started by: d4rkm4nx99
2 Replies

6. UNIX for Dummies Questions & Answers

UNIX installer??

hi i wanna ask that is there a software available for unix to install different files... e.g. when we install a file in windows the installation wizard runs and guides us through the process... if so plz tell... and guide thnx! (5 Replies)
Discussion started by: umarbangash
5 Replies

7. UNIX for Advanced & Expert Users

Create an installer

I have a software bundle for which I want to create an installer. One of the things I am also looking at, is to be able to install this straight from a CD or any external storage device. How do I go about creating one? This is for Linux. Any advice is welcome !! -- garric (3 Replies)
Discussion started by: garric
3 Replies

8. Gentoo

Unix OS Installer

Hey Guys, Can somebody help me get a unix OS installer (preferably no charge)? Can I install it on intel pc? I got a copy of unix installer a year ago and tried installing it on an intel pc but I can't get it done although I was already following instructions. Slick (42 Replies)
Discussion started by: Slick
42 Replies
Login or Register to Ask a Question