【发布时间】:2011-01-26 17:35:52
【问题描述】:
我刚刚在 linux (ubuntu) 中开发了一个 opengl 游戏。现在我想为其编写一个安装脚本,使用命令将游戏直接安装到 apt 中。
sudo apt-get install ...
这样它就可以在整个 linux 的任何地方运行,而无需进入游戏的指定文件夹。有人知道怎么做吗?
【问题讨论】:
标签: linux installation
我刚刚在 linux (ubuntu) 中开发了一个 opengl 游戏。现在我想为其编写一个安装脚本,使用命令将游戏直接安装到 apt 中。
sudo apt-get install ...
这样它就可以在整个 linux 的任何地方运行,而无需进入游戏的指定文件夹。有人知道怎么做吗?
【问题讨论】:
标签: linux installation
#!/bin/bash
set -eu -o pipefail # fail on error , debug all lines
sudo -n true
test $? -eq 0 || exit 1 "you should have sudo priveledge to run this script"
echo installing the must-have pre-requisites
while read -r p ; do sudo apt-get install -y $p ; done < <(cat << "EOF"
perl
zip unzip
exuberant-ctags
mutt
libxml-atom-perl
postgresql-9.6
libdbd-pgsql
curl
wget
libwww-curl-perl
EOF
)
echo installing the nice-to-have pre-requisites
echo you have 5 seconds to proceed ...
echo or
echo hit Ctrl+C to quit
echo -e "\n"
sleep 6
sudo apt-get install -y tig
【讨论】: