Skip to content

Instantly share code, notes, and snippets.

@kazmura11
Created September 27, 2014 12:04
Show Gist options
  • Select an option

  • Save kazmura11/707363f50ba5b99c42c7 to your computer and use it in GitHub Desktop.

Select an option

Save kazmura11/707363f50ba5b99c42c7 to your computer and use it in GitHub Desktop.
apt-cygの断片
# this script requires some packages
ARCH='x86_64' # default
if [ $(arch) = 'x86_64' ] ; then
ARCH='x86_64'
else
ARCH='x86'
fi
echo "Architecture: $ARCH"
WGET=`which wget 2> /dev/null`
...(省略)
mv setup.ini setup.ini-save
# wget -N $mirror/setup.bz2
wget -N $mirror/$ARCH/setup.bz2
if test -e setup.bz2 && test $? -eq 0
then
bunzip2 setup.bz2
mv setup setup.ini
echo Updated setup.ini
else
# wget -N $mirror/setup.ini
wget -N $mirror/$ARCH/setup.ini
if test -e setup.ini && test $? -eq 0
then
echo Updated setup.ini
||<
何かをインストールするときの例
以下のスクリプトを書く
$ vi apt-install
>|bash|
#!/bin/bash
apt-get install gcc
apt-get install gcc-core
apt-get install gcc-debuginfo
apt-get install gcc-fortran
apt-get install gcc-g++
apt-get install libgcc1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment