我刚刚完成了(我想)编写了一个bash脚本来将我所有必要的软件安装到Ubuntu。我将为不同的发行版做更多的工作,但是一旦我有了一个发行版,我就可以把剩下的做得很好。
然而,我对这一切都很陌生,而且几乎没有使用cli,所以我确信下面有很多错误。如果你能读一读,让我知道我能修复/改进什么,那就太棒了!这意味着要运行一个几乎干净的安装;我必须打开Firefox并下载两个文件:脚本和扩展列表。除此之外,一切仍设置为默认设置。
#!/bin/bash
sudo apt-get install -y gnome-tweak-tool
sudo apt-get install -y variety
sudo apt-get install -y hunspell-en-gb
sudo apt-get install -y gdebi
sudo apt-get install -y gparted
sudo apt-get install -y libreoffice-style-breeze
sudo apt-get install -y evolution
sudo apt-get install -y evolution-indicator
sudo apt-get install -y cairo-dock
cd
cd Downloads
mkdir Programs
cd Programs
wget https://steamcdn-a.akamaihd.net/client/installer/steam.deb
sudo dpkg -i steam.deb
sudo apt-get install -f
wget https://atom.io/download/deb
sudo dpkg -i atom*
sudo apt-get install -f
wget https://www.realvnc.com/download/file/vnc.files/VNC-Server-6.2.0-Linux-x64.deb
sudo dpkg -i VNC-Server*
sudo apt-get install -f
wget https://www.realvnc.com/download/file/viewer.files/VNC-Viewer-6.17.731-Linux-x64.deb
sudo dpkg -i VNC-Viewer*
sudo apt-get install -f
sudo cd /usr/share/icons
wget https://dl.opendesktop.org/api/files/download/id/1464728434/164587-bridge.tar.gz
tar -xvzf 164587-bridge.tar.gz
sudo add-apt-repository ppa:papirus/papirus
sudo apt update
sudo apt-get install papirus-icon-theme
sudo apt install numix-gtk-theme
xterm -e "echo Make sure you select Bridge as the cursor, Papirus as the icon theme, and Numix as the GTK+ theme && gnome-tweak-tool"
cd
xterm -e "echo Replace whatever is there with Bridge && sudo gedit /usr/share/icons/default/index.theme"
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key FDC247B7
echo 'deb https://repo.windscribe.com/ubuntu zesty main' | sudo tee /etc/apt/sources.list.d/windscribe-repo.list
sudo apt-get update
sudo apt-get install windscribe-cli
xterm windscribe login && windscribe start && echo Connect to Windscribe with windscribe connect best
echo All thats left is to do is, if youre using GNOME, enable all of your chosen extensions at extensions.gnome.org
cd
echo Use gedit /Documents/Scripts/Extension_Links to view my links to GNOME Shell Extensions发布于 2017-09-18 19:54:58
代码
这个脚本看起来像一堵代码墙。如果用空白行将相关的命令组隔开,那么阅读起来会更愉快,例如:
# install steam
wget https://steamcdn-a.akamaihd.net/client/installer/steam.deb
sudo dpkg -i steam.deb
sudo apt-get install -f
# install atom
wget https://atom.io/download/deb
sudo dpkg -i atom*
sudo apt-get install -f这不是一种在打开gnome-tweak-tool之前向用户显示消息的非常友好(或漂亮)的方式:
请确保选择桥作为光标,帕皮鲁斯作为图标主题,Numix作为GTK+主题&& gnome-微调工具。
由于您使用的是Gnome,所以您可以从zenity (一个显示对话框的可编写脚本的工具)中获益,例如:
zenity --info --text="Make sure you select Bridge as the cursor, Papirus as the icon theme, and Numix as the GTK+ theme" && gnome-tweak-tool此命令将没有任何有用的效果:
sudo cd /usr/share/图标
事实上,与之相反的是:
sudo cd /usr/share/图标wget https://dl.opendesktop.org/api/files/download/id/1464728434/164587-bridge.tar.gz tar -xvzf 164587-bridge.tar.gz
你可能想做这样的事:
wget -O /tmp/bridge.tar.gz https://dl.opendesktop.org/api/files/download/id/1464728434/164587-bridge.tar.gz
sudo tar -xvzf /tmp/bridge.tar.gz -C /usr/share/icons也就是说,将tarball下载到一个临时文件夹中,并将带有root的内容解压缩到/usr/share/icons中。
https://codereview.stackexchange.com/questions/176003
复制相似问题