Skip to content

Instantly share code, notes, and snippets.

@s-wool
Created November 17, 2013 18:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s-wool/7516488 to your computer and use it in GitHub Desktop.
Save s-wool/7516488 to your computer and use it in GitHub Desktop.
apt-cygの64bit対応とxzファイルの対応
--- apt-cyg.orig 2010-04-28 03:55:43.000000000 +0900
+++ apt-cyg 2013-11-18 03:31:25.034070400 +0900
@@ -95,14 +95,14 @@ function getsetup()
then
touch setup.ini
mv setup.ini setup.ini-save
- wget -N $mirror/setup.bz2
+ wget -N $mirror/x86_64/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/x86_64/setup.ini
if test -e setup.ini && test $? -eq 0
then
echo Updated setup.ini
@@ -350,7 +350,11 @@ case "$command" in
fi
echo "Unpacking..."
- cat $file | bunzip2 | tar > "/etc/setup/$pkg.lst" xvf - -C /
+ case "$file" in
+ *.tar.bz2) cat $file | bunzip2 | tar > "/etc/setup/$pkg.lst" xvf - -C / ;;
+ *.tar.xz) cat $file | xz -dv | tar > "/etc/setup/$pkg.lst" xvf - -C / ;;
+ *) echo Unknown extension, exting : $file; exit 1 ;;
+ esac
gzip -f "/etc/setup/$pkg.lst"
cd ../..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment