Created
March 30, 2017 15:12
-
-
Save mklkj/3e06d4892cc9d900c7eaa1211c77b68c to your computer and use it in GitHub Desktop.
DreamSpark downloader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Download files from DreamSpark | |
# Project use Linux-SDM-Downloader and xSDM | |
# Usage: | |
# chmod u+x dreamsparkdownloader.sh | |
# ./dreamsparkdownloader.sh <sdx-file> | |
sdx_file=$1 | |
catalog="drimspark.$(date +%s | sha256sum | base64 | head -c 32)" | |
# create catalog | |
mkdir $catalog | |
cd $catalog | |
# clone repos | |
echo "Clone repositories..." | |
git clone https://github.com/RadekSimkanic/Linux-SDM-Downloader.git -q | |
git clone https://github.com/v3l0c1r4pt0r/xSDM.git -q | |
# download file | |
python Linux-SDM-Downloader/main.py ../$sdx_file | |
# find filename | |
filename=$(basename $(find . -type f -name '*.sdc')) | |
# extract file | |
cd xSDM | |
./configure | |
make | |
cd ../../ | |
$catalog/xSDM/src/xsdm $catalog/$filename | |
# move file | |
cd $catalog | |
iso_file=$(find | grep ".iso") | |
mv "$iso_file" ../ | |
# remove unnecessary files | |
cd ../ | |
rm -rf $catalog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment