forked from shijimasoft/cia-unix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dltools.sh
executable file
·46 lines (38 loc) · 2.03 KB
/
dltools.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
BOLD=$(tput bold)
NORMAL=$(tput sgr0)
CTRTOOL_VER=1.1.0
MAKEROM_VER=0.18.3
if [[ "$OSTYPE" == "darwin"* ]]; then
echo " * Downloading ${BOLD}ctrtool${NORMAL}"
wget https://github.com/3DSGuy/Project_CTR/releases/download/ctrtool-v$CTRTOOL_VER/ctrtool-v$CTRTOOL_VER-macos_x86_64.zip -q
echo " * Extracting ${BOLD}ctrtool${NORMAL}"
unzip -qq ctrtool-v$CTRTOOL_VER-macos_x86_64.zip -d ctrtool-v$CTRTOOL_VER-macos_x86_64
mv ctrtool-v$CTRTOOL_VER-macos_x86_64/ctrtool "$SCRIPT_DIR/ctrtool"
echo " * Downloading ${BOLD}makerom${NORMAL}"
wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v$MAKEROM_VER/makerom-v$MAKEROM_VER-macos_x86_64.zip -q
echo " * Extracting ${BOLD}makerom${NORMAL}"
unzip -qq makerom-v$MAKEROM_VER-macos_x86_64.zip -d makerom-v$MAKEROM_VER-macos_x86_64
mv makerom-v$MAKEROM_VER-macos_x86_64/makerom "$SCRIPT_DIR/makerom"
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo " * Downloading ${BOLD}ctrtool${NORMAL}"
wget https://github.com/3DSGuy/Project_CTR/releases/download/ctrtool-v$CTRTOOL_VER/ctrtool-v$CTRTOOL_VER-ubuntu_x86_64.zip -q
echo " * Extracting ${BOLD}ctrtool${NORMAL}"
unzip -qq ctrtool-v$CTRTOOL_VER-ubuntu_x86_64.zip -d ctrtool-v$CTRTOOL_VER-ubuntu_x86_64
mv ctrtool-v$CTRTOOL_VER-ubuntu_x86_64/ctrtool "$SCRIPT_DIR/ctrtool"
echo " * Downloading ${BOLD}makerom${NORMAL}"
wget https://github.com/3DSGuy/Project_CTR/releases/download/makerom-v$MAKEROM_VER/makerom-v$MAKEROM_VER-ubuntu_x86_64.zip -q
echo " * Extracting ${BOLD}makerom${NORMAL}"
unzip -qq makerom-v$MAKEROM_VER-ubuntu_x86_64.zip -d makerom-v$MAKEROM_VER-ubuntu_x86_64
mv makerom-v$MAKEROM_VER-ubuntu_x86_64/makerom "$SCRIPT_DIR/makerom"
fi
if [[ ! -f "decrypt.py" ]]; then
echo " * Downloading ${BOLD}decrypt.py${NORMAL}"
wget https://raw.githubusercontent.com/shijimasoft/cia-unix/main/decrypt.py -q
fi
echo " * Cleaning up"
rm -rf ctrtool-v$CTRTOOL_VER-*
rm -rf makerom-v$MAKEROM_VER-*
chmod +x ctrtool makerom
echo