Skip to content

Instantly share code, notes, and snippets.

@jamestomasino
Last active September 26, 2023 14:02
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 jamestomasino/5f66ac86804dd41088d0 to your computer and use it in GitHub Desktop.
Save jamestomasino/5f66ac86804dd41088d0 to your computer and use it in GitHub Desktop.
Cygwin Package Configuration Backup & Batch Installer
#!/bin/sh
# Builds a batch file that will run a Cygwin installer with the same packages currently installed
# on this system. Think of it as a package-list backup.
echo -n "setup-x86_64.exe -P " > update.bat
cygcheck -c -d | sed -e "1,2d" -e 's/ .*$//' | awk 'NR==1{printf $1}{printf ",%s", $1}' >> update.bat
setup-x86_64.exe -P _autorebase,_autorebase,_update-info-dir,adwaita-icon-theme,alternatives,apache2,apache2-mod_php5,at-spi2-core,autoconf,autoconf2.1,autoconf2.5,automake,automake1.10,automake1.11,automake1.12,automake1.13,automake1.14,automake1.15,automake1.4,automake1.5,automake1.6,automake1.7,automake1.8,automake1.9,base-cygwin,base-files,bash,bash-completion,bind-utils,binutils,bzip2,ca-certificates,cmake,coreutils,cron,crypt,csih,ctags,curl,cygrunsrv,cygutils,cygwin,cygwin-devel,dash,dconf-service,diffutils,dos2unix,dri-drivers,editrights,file,findutils,font-adobe-dpi75,font-alias,font-encodings,font-misc-misc,fontconfig,gamin,gawk,gcc-core,gconf-desktop-schemas,GConf2,gd,gdk-pixbuf2.0-svg,getent,git,git-completion,glib2.0-networking,gnome-icon-theme,gnome-terminal,grep,groff,gsettings-desktop-schemas,gtk-update-icon-cache,gzip,hicolor-icon-theme,hostname,info,ipc-utils,irssi,less,libapr1,libaprutil1,libarchive13,libargp,libatk-bridge2.0_0,libatk1.0_0,libatomic1,libatspi0,libattr1,libblkid1,libbz2_1,libcairo2,libcatgets1,libcloog-isl4,libcom_err2,libcroco0.6_3,libcrypt0,libcurl4,libdatrie1,libdb5.3,libdbus-glib_1_2,libdbus1_3,libdconf1,libedit0,libEGL1,libevent2.0_5,libexpat1,libfam0,libffi6,libfontconfig1,libfontenc1,libfreetype6,libgcc1,libgconf2_4,libgcrypt20,libgd3,libgdbm4,libgdk_pixbuf2.0_0,libgfortran3,libGL1,libglapi0,libglib2.0_0,libgmp10,libgnutls28,libgomp1,libgpg-error0,libgraphite2_3,libgssapi_krb5_2,libgtk2.0_0,libgtk3_0,libguile17,libharfbuzz0,libhogweed2,libICE6,libiconv,libiconv2,libicu51,libicu54,libidn11,libintl-devel,libintl8,libiodbc2,libisl10,libjasper1,libjbig2,libjpeg8,libjson-glib1.0_0,libk5crypto3,libkrb5_3,libkrb5support0,liblcms2_2,libllvm3.4,libltdl7,liblzma-devel,liblzma5,liblzo2_2,libmcrypt-devel,libmcrypt4,libmetalink3,libmhash2,libmpc3,libmpfr4,libmysqlclient18,libncursesw10,libnettle4,libopenldap2_4_2,libopenssl100,libOpenVG1,libp11-kit0,libpango1.0_0,libpcre-devel,libpcre1,libpcre16_0,libpcre32_0,libpcrecpp0,libpcreposix0,libpipeline1,libpixman1_0,libpng-doc,libpng15,libpng16,libpopt0,libpq5,libprotobuf8,libproxy1,libquadmath0,libreadline7,librest0.7_0,librsvg2_2,libsasl2_3,libSM6,libsmartcols1,libsoup-gnome2.4_1,libsoup2.4_1,libsqlite3_0,libssh2_1,libssp0,libstartup-notification1_0,libstdc++6,libsybdb5,libtasn1_6,libthai0,libtidy0_99_0,libtiff6,libuuid-devel,libuuid1,libvpx1,libvte2.91_0,libvte9,libwebp5,libwebpmux1,libwrap0,libX11-xcb1,libX11_6,libXau6,libXaw7,libxcb-glx0,libxcb-render0,libxcb-shm0,libxcb-util1,libxcb1,libXcomposite1,libXcursor1,libXdamage1,libXdmcp6,libXext6,libXfixes3,libXft2,libXi6,libXinerama1,libxml2,libXmu6,libXpm4,libXrandr2,libXrender1,libxslt,libXss1,libXt6,libXtst6,libyaml0_2,login,luit,lynx,m4,make,makedepend,man-db,mate-terminal,mcrypt,mintty,mkfontdir,mkfontscale,mosh,mysql,mysql-test,mysqld,ncurses,openssh,openssl,p11-kit,p11-kit-trust,perl,perl-Carp,perl-DBD-mysql,perl-DBI,perl-Encode-Locale,perl-Error,perl-File-Listing,perl-HTML-Parser,perl-HTTP-Cookies,perl-HTTP-Daemon,perl-HTTP-Date,perl-HTTP-Message,perl-HTTP-Negotiate,perl-libwww-perl,perl-LWP,perl-LWP-MediaTypes,perl-Net-HTTP,perl-Params-Util,perl-Socket,perl-URI,perl-WWW-RobotRules,perl_autorebase,perl_base,php,php-bz2,php-curl,php-gd,php-mcrypt,php-mysql,php-pdo_dblib,php-pdo_mysql,php-pdo_sqlite,php-sqlite3,php-tidy,php-xmlreader,php-xmlrpc,ping,pkg-config,popt,python,python-beautifulsoup,python-chardet,python-dateutil,python-doc,python-docutils,python-gobject-doc,python-gtk2.0-doc,python-imaging,python-jinja2,python-lxml,python-markupsafe,python-pygments,python-pytz,python-setuptools,python-six,python-xapian-doc,python3,python3-doc,R,R_autorebase,rebase,rsync,ruby,ruby-doc,ruby-io-console,ruby-json,ruby-minitest4,ruby-psych,ruby-rake,ruby-rdoc,rubygems,run,rxvt-unicode,sed,shared-mime-info,sqlite3,sqlite3-vfslog,t1lib5,tar,tcl,tcl-tk,tcsh,terminfo,texinfo,tidy,tig,tmux,tzcode,util-linux,vim,vim-common,vim-minimal,w32api-headers,w32api-runtime,wget,which,windows-default-manifest,xterm,xxd,xz,zip,zlib0
@jamestomasino
Copy link
Author

To just run this remotely:

bash <(curl -s https://gist.githubusercontent.com/jamestomasino/5f66ac86804dd41088d0/raw/0573c93e1ea83347dfd2adde7ddc016171385e4e/cygwinbackup.sh)

Remember to run update.bat from the same folder that houses setup-x86_64.exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment