The install and uninstall scripts are executed in the webapp directory for the app. You should '''not code absolute paths ''' in the (un)install scripts. You can use $PWD if you really have to. Apps may be install in different environments in the future, such as when two instance of an app are installed.
You should also not make assumptions about application names.
== Use of inline text with EOF ==
You can typically create or patch files with inline text files:
cat > foo.bar << EOF
some
$PWD
here
EOF
The above will create a file called foo.bar and have three lines. The second like will have a path. i.e. any $-variables will be substituted.
When the EOF is quoted with 'EOF' there will be no substitution:
cat > foo.bar << 'EOF'
some
$PWD
here
EOF
The second line will have $PWD.
You can also feed inline files to patch (read man patch) with diffs that will then be used to patch files on the fly.
== hda-install-file utility script ==