Last active
October 9, 2020 12:23
-
-
Save explodecomputer/bbcfe22cce1658a717b30419b2d311d7 to your computer and use it in GitHub Desktop.
vm_setup.sh
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
#!/bin/bash | |
set -e | |
# Create shortcut to documents | |
echo "Creating shortcut to Documents" | |
cd /mnt/c/Users | |
un=`ls -dl */ | awk '{ print $9 }' | sed "s@/@@g" | grep -v Default | grep -v Public | grep -v defaultuser0 | head -n 1` | |
cd ~ | |
rm -f Documents | |
ln -s /mnt/c/Users/${un}/Documents | |
# Download data files to documents | |
echo "Downloading data" | |
rm -rf ibsc_unit* | |
wget https://www.dropbox.com/s/p1tixpzp4pfelmf/ibsc_unit2.tgz?dl=0 -O ibsc_unit2.tgz | |
tar xzvf ibsc_unit2.tgz | |
mv ibsc_unit2 Documents | |
rm ibsc_unit2.tgz | |
# sudo chown -R $USER:$USER ~/Documents/ibsc_unit2 | |
# Modify .bashrc to start in home directory | |
echo "Updating .bashrc" | |
echo "cd ~/Documents/" >> .bashrc | |
echo "PATH=\$PATH:/mnt/c/Users/$un/Documents/ibsc_unit2/bin" >> .bashrc | |
source ~/.bashrc | |
echo "Adding subl command" | |
wget -O ~/Documents/ibsc_unit2/bin/subl https://gist.githubusercontent.com/explodecomputer/7fa4766b470566df49c1cb440ebde3a7/raw/4e5c1792081ab75b8e5dc0aaa482f08cc8d13338/subl | |
chmod 777 ~/Documents/ibsc_unit2/bin/subl | |
echo "" | |
echo "" | |
echo "Setup completed successfully!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run: