3 DATADIR
="/usr/local/etc/wiifuse"
5 PARTDIR
="$1/.internals"
6 CERTSFILE
="$PARTDIR/certs"
8 TICKETFILE
="$PARTDIR/ticket"
10 META_ID
="$1/crypto/title_id"
11 META_NAME
="$1/header/name"
13 if [ -z "$1" -o ! -d "$PARTDIR" ]; then
14 echo "usage: $0 <mounted wiifuse partition directory> [name]"
18 if [ ! -f "$CERTSFILE" -o ! -f "$TMDFILE" -o ! -f "$TICKETFILE" \
19 -o ! -f "$META_ID" -o ! -f "$META_NAME" ]; then
20 echo "error: directory $1 is not a mounted wiifuse partition"
24 ID
=`cat "$META_ID" | cut -d 'x' -f 2`
25 NAME
=`cat "$META_NAME" | tr ' ' '_'`
27 echo "found '$NAME' ($ID)"
29 if [ ! -z "$2" ]; then
33 cp -vf "$CERTSFILE" "$DATADIR/$ID.certs"
34 cp -vf "$TMDFILE" "$DATADIR/$ID.tmd"
35 cp -vf "$TICKETFILE" "$DATADIR/$ID.tik"
38 ln -vsf "$ID.certs" "$NAME.certs"
39 ln -vsf "$ID.tmd" "$NAME.tmd"
40 ln -vsf "$ID.tik" "$NAME.tik"