Skip to content

Instantly share code, notes, and snippets.

@laraconda
Created January 14, 2017 02:03
Show Gist options
  • Save laraconda/82825bff140e4c49eb1cb9c433ffe799 to your computer and use it in GitHub Desktop.
Save laraconda/82825bff140e4c49eb1cb9c433ffe799 to your computer and use it in GitHub Desktop.
#!/bin/sh
# setup_config - Create necessary files so you can use the config
# command to explain and describe the configuration of your computer
path_config_file=/home/config
if [ ! -f $path_config_file ]; then
sudo touch $path_config_file
fi
sudo chmod 664 $path_config_file
text="Describe the config of your computer in $path_config_file"
sudo sh -c "echo $text > $path_config_file"
path_global_aliases=/etc/profile.d/00-aliases.sh
if [ ! -f $path_global_aliases ]; then
sudo touch $path_global_aliases
fi
sudo chmod +x $path_global_aliases
text="alias config=\'cat /home/config\'"
sudo sh -c "echo $text > $path_global_aliases"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment