1#!/usr/bin/env bash
2
3###############################################################################
4#
5# Copyright (C) 2009-2013 Nintendo.  All rights reserved.
6#
7# These coded instructions, statements, and computer programs contain
8# proprietary information of Nintendo of America Inc. and/or Nintendo
9# Company Ltd., and are protected by Federal copyright law.  They may
10# not be disclosed to third parties or copied or duplicated in any form,
11# in whole or in part, without the prior written consent of Nintendo.
12#
13###############################################################################
14
15if [ "$_" != "$0" ]
16then
17    command_option="$1"
18
19    if [ -z "$command_option" ]
20    then
21        echo "Usage: source pcfsoversata -enable|-disable"
22        echo "    -enable       Enable PCFS over SATA connectivity."
23        echo "    -disable      Disable PCFS over SATA connectivity."
24        echo
25    else
26        if [ "$command_option" = "-enable" ]
27        then
28            cafeoptions.bat -pcfsoversata >/dev/null
29            export USE_PCFS_OVER_SATA=1
30
31        elif [ "$command_option" = "-disable" ]
32        then
33            cafeoptions.bat -nopcfsoversata >/dev/null
34            unset USE_PCFS_OVER_SATA
35        fi
36    fi
37else
38    echo "$(basename $0): Error!  Can't be ran as a script."
39    echo
40    echo "Please run as:"
41    echo "    source $(basename $0)"
42    echo "  - or -"
43    echo "    . $(basename $0)"
44    echo
45fi
46