2 PATH=/usr/bin:/bin:/usr/sbin:/sbin;
3 SAMPLES_SRC=`dirname $0`/../samples;
6 echo "Error: target directory missing";
7 echo "Usage: cuda-install-samples-6.5.sh <target directory>";
8 echo " Will append NVIDIA_CUDA-6.5_Samples to <target directory>";
13 echo $SAMPLES_DIR | grep -q "/$"
15 SAMPLES_DIR=$SAMPLES_DIR"/";
17 SAMPLES_DIR=$SAMPLES_DIR"NVIDIA_CUDA-6.5_Samples";
19 mkdir -p "$SAMPLES_DIR" >/dev/null 2>&1;
21 if [ -d "$SAMPLES_DIR" -a -w "$SAMPLES_DIR" ]; then
22 echo "Copying samples to $SAMPLES_DIR now...";
23 cp -R $SAMPLES_SRC/* "$SAMPLES_DIR";
24 echo "Finished copying samples.";
26 echo "Do not have permissions to write to $SAMPLES_DIR";