source: CCCC/trunk/userinst.sh @ 256

Subversion URL: http://proj.badc.rl.ac.uk/svn/exarch/CCCC/trunk/userinst.sh@549
Revision 256, 766 bytes checked in by mjuckes, 6 years ago (diff)

userinst.sh extended to make bin directory if needed

Line 
1
2
3
4targetDir=$HOME/bin
5target=$targetDir/ceda_cc
6
7#### 1. Make target directory is not present
8###############################################
9
10if [ ! -d "$targetDir" ]; then
11  # Control will enter here if $targetDir doesn't exist.
12  echo creating directory $targetDir
13  mkdir $targetDir
14fi
15
16#### 2. Create a script
17###############################################
18
19echo Creating bash script in $target
20cat > $target << EOF
21#!/bin/bash
22# CEDA CC entry script
23# To execute python scripts in $PWD/ceda_cc
24# License file: $PWD/LICENSE
25# Vocabularies: $PWD/ceda_cc/config
26
27if [ \$1 == '-h' ];
28  then
29  cat $PWD/README.txt
30  exit
31fi
32
33python $PWD/ceda_cc/c4.py \$*
34EOF
35
36#### 2. Make the script executable
37###############################################
38chmod u+x $target 
Note: See TracBrowser for help on using the repository browser.