filesystem: New package. Replace msys2-base

This commit is contained in:
Alexpux 2014-07-01 15:36:35 +04:00
parent fdf0fdb2e8
commit 4711f5800e
22 changed files with 1548 additions and 0 deletions

129
filesystem/PKGBUILD Normal file
View File

@ -0,0 +1,129 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
pkgname=filesystem
pkgver=2014.07
pkgrel=1
pkgdesc='Base filesystem'
arch=('i686' 'x86_64')
license=('GPL')
url='http://sourceforge.net/projects/msys2/'
groups=('base')
provides=('msys2-base')
replaces=('msys2-base')
backup=('etc/fstab' 'etc/nsswitch.conf'
'etc/shells' 'etc/profile'
etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
source=('bash.bash_logout'
'bash.bashrc'
'cmd'
'dep-search'
'dot.bash_logout'
'dot.bash_profile'
'dot.bashrc'
'dot.inputrc'
'dot.profile'
'fstab'
'mingw32_shell.bat'
'mingw64_shell.bat'
'msys2_shell.bat'
'msys2.ico'
'nsswitch.conf'
'profile'
'profile.lang.sh'
'profile.tzset.sh'
'regen-info.sh'
'shells'
'start')
md5sums=('c12607b8c0c1b1e62dc3a816587cc55a'
'703bb05605d2b86b8b2b507ecf19a935'
'9ffd57721725e961ffd5e311d6c2f374'
'e6a830e08fce049c78272d275f57d57f'
'42f4400ed2314bd7519c020d0187edc5'
'458aa972659c058d627b25587930511e'
'dcef4f8b852dcc323f87c340a278a36e'
'6ea3824f8671521b1538da36696e07f6'
'45ec155d3235c038f1b74521bfbac2b7'
'b0eb2ba1c1bc95e678309fd36dac27db'
'8b24de776b515eafb30039d6b582b72e'
'd312634eb85460153c6f72a61fec8467'
'd0fd81bd0300bf47cbcb8e5892b8136c'
'292ad5cdd78abac9d694cc06819a96fc'
'b316f2870e4acefc09a814e34edf6da5'
'3c7eff10ccbde5f9129fc51d47c974a7'
'118fa00617d4d0b2eb337dd565d44494'
'39c1d2412eb62864c8c07cb2557c7da3'
'3b6753667b61800db1a30c614efd1ee1'
'bb51026508581e55bbefe36e2b799108'
'900c95162b9c3f7a29912408e0579852')
build() {
cd ${srcdir}
}
package() {
cd ${pkgdir}
#
# setup root filesystem
#
for d in dev etc home usr var opt mingw32 mingw64; do
install -d -m755 ${d}
done
mkdir -p tmp
# setup /etc
install -d etc/{fstab.d,skel,profile.d}
for f in bash.bashrc bash.bash_logout fstab nsswitch.conf shells profile; do
install -m644 ${srcdir}/${f} etc/
done
# user configuration file skeletons
install -m755 ${srcdir}/dot.bashrc etc/skel/.bashrc
install -m755 ${srcdir}/dot.inputrc etc/skel/.inputrc
install -m755 ${srcdir}/dot.bash_profile etc/skel/.bash_profile
install -m755 ${srcdir}/dot.bash_logout etc/skel/.bash_logout
install -m755 ${srcdir}/profile.tzset.sh etc/profile.d/tzset.sh
install -m755 ${srcdir}/profile.lang.sh etc/profile.d/lang.sh
install -m644 ${srcdir}/msys2.ico msys2.ico
install -m755 ${srcdir}/msys2_shell.bat msys2_shell.bat
install -m755 ${srcdir}/mingw32_shell.bat mingw32_shell.bat
install -m755 ${srcdir}/mingw64_shell.bat mingw64_shell.bat
# setup /var
for d in cache/man local opt log/old lib/misc empty; do
install -d -m755 var/${d}
done
mkdir -p var/tmp
#
# setup /usr hierarchy
#
for d in bin include lib sbin share/misc src; do
install -d -m755 usr/${d}
done
for d in $(seq 8); do
install -d -m755 usr/share/man/man${d}
done
# various shell scripts
for f in cmd start dep-search; do
install -m755 ${srcdir}/${f} usr/bin
done
install -m755 ${srcdir}/regen-info.sh usr/sbin
#
# setup /mingw32 hierarchy
#
for d in bin etc include lib share; do
install -d -m755 mingw32/${d}
done
#
# setup /mingw64 hierarchy
#
for d in bin etc include lib share; do
install -d -m755 mingw64/${d}
done
}

View File

@ -0,0 +1,21 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# /etc/bash.bash_logout: executed by bash(1) when login shell exits.
# The latest version as installed by the MSYS2 Setup program can
# always be found at /etc/defaults/etc/bash.bash_logout
# Modifying /etc/bash.bash_logout directly will prevent
# setup from updating it.
# System-wide bashrc file
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear ] && /usr/bin/clear
fi

28
filesystem/bash.bashrc Normal file
View File

@ -0,0 +1,28 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# /etc/bash.bashrc: executed by bash(1) for interactive shells.
# The latest version as installed by the MSYS2 Setup program can
# always be found at /etc/defaults/etc/bash.bashrc
# Modifying /etc/bash.bashrc directly will prevent
# setup from updating it.
# System-wide bashrc file
# Check that we haven't already been sourced.
([[ -z ${CYG_SYS_BASHRC} ]] && CYG_SYS_BASHRC="1") || return
# If not running interactively, don't do anything
[[ "$-" != *i* ]] && return
# Set a default prompt of: user@host and current_directory
PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
# Uncomment to use the terminal colours set in DIR_COLORS
# eval "$(dircolors -b /etc/DIR_COLORS)"

8
filesystem/cmd Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Copyright (C) 2014, Alexey Pavlov
# mailto:alexpux@gmail.com
# This file is part of Minimal SYStem version 2.
# https://sourceforge.net/p/msys2/wiki/MSYS2%20installation/
# File: cmd
"$COMSPEC" "$@"

230
filesystem/dep-search Normal file
View File

@ -0,0 +1,230 @@
#!/usr/bin/env bash
#
# dep-search - utility for searching library dependencies
# of Windows executables and shared libraries.
#
# The BSD 3-Clause License. http://www.opensource.org/licenses/BSD-3-Clause
#
# This file is part of 'MSYS2' project.
# Copyright (c) 2014 by Alexpux (alexpux doggy gmail dotty com)
# All rights reserved.
#
# Project: MSYS2 ( http://sourceforge.net/projects/msys2/ )
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the distribution.
# - Neither the name of the 'MinGW-W64' nor the names of its contributors may
# be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# **************************************************************************
# dep-search uses quite a few external programs during its execution. You
# need to have at least the following installed for dep-search to function:
# binutils, grep, sed
#
declare -r depsearch_name='dep-search'
declare -r depsearch_version='0.1'
_search_dir=$(pwd)
_search_file=
_search_pattern=
_search_mode=all
_prog_output=plain
_run_mode=dir
_verbose=0
export LC_ALL=C
### SUBROUTINES ###
plain() {
local mesg=$1; shift
printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
print_msg0() {
local mesg=$1; shift
printf "${YELLOW}=> ${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
print_msg1() {
local mesg=$1; shift
printf "${GREEN}==> ${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
print_msg2() {
local mesg=$1; shift
printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
print_error() {
local mesg=$1; shift
printf "${RED}==> ERROR:${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
}
die() {
# $1 - message to die
printf "$1"
exit 1
}
usage() {
printf "$depsearch_name (MSYS2) %s\n" "$depsearch_version"
echo
printf -- "Usage: %s [options]\n" "$0"
echo
printf -- "Options:\n"
printf -- " --directory=<dir> Search dependencies in specified directory\n"
printf -- " --file=<filename> Search dependencies for specified executable\n"
printf -- " --library=<library_pattern> Pattern of library that need to be resolved as dependency\n"
printf -- " --output=[list|plain] Output search result for human(plain) or as list of executables.\n"
printf -- " --verbose Output more information.\n"
echo
}
version() {
printf "$depsearch_name (MSYS2) %s\n" "$depsearch_version"
printf -- "Copyright (c) 2014 by Alexpux (alexpux doggy gmail dotty com).\n"
}
process_binary() {
# $1 - windows PE file
# $2 - search pattern
# process all libraries needed by the binary
if [[ -n $2 ]]; then
local _lower_pattern=$(echo $2 | tr 'A-Z' 'a-z')
fi
local _sofile=
for _sofile in $(LC_ALL=C objdump -x "$1" 2>/dev/null | sed -nr 's/.*DLL Name: (.*).*/\1/p')
do
if [[ -n $2 ]]; then
local _lower_sofile=$(echo $_sofile | tr 'A-Z' 'a-z')
if [ "$(echo $_lower_sofile | grep -Eio $_lower_pattern)" = "$_lower_pattern" ]; then
if [[ $_verbose = 1 ]]; then
print_msg2 "$1: $_sofile"
else
print_msg2 "$(basename $1): $_sofile"
fi
fi
else
print_msg2 "$_sofile"
fi
done
}
process_directory() {
# $1 - derectory to search
# $2 - search pattern
local _file_list=$(find "$1" -type f -name "*.dll" -o -name "*.exe" -o -name "*.so" -o -name "*.pyd")
local _it=
if [[ ${#_file_list[@]} = 0 ]]; then
print_msg1 "There are no executables or dll's in $1."
else
for _it in ${_file_list[@]}; do
if [[ $_verbose = 1 ]]; then
print_msg1 "Processing $_it"
fi
process_binary "$_it" "$2"
done
fi
}
# check if messages are to be printed using color
unset ALL_OFF BOLD BLUE GREEN RED YELLOW
if [[ -t 2 && ! $USE_COLOR = "n" ]]; then
# prefer terminal safe colored and bold text when tput is supported
if /usr/bin/tput setaf 0 &>/dev/null; then
ALL_OFF="$(/usr/bin/tput sgr0)"
BOLD="$(/usr/bin/tput bold)"
BLUE="${BOLD}$(/usr/bin/tput setaf 4)"
GREEN="${BOLD}$(/usr/bin/tput setaf 2)"
RED="${BOLD}$(/usr/bin/tput setaf 1)"
YELLOW="${BOLD}$(/usr/bin/tput setaf 3)"
else
ALL_OFF="\e[1;0m"
BOLD="\e[1;1m"
BLUE="${BOLD}\e[1;34m"
GREEN="${BOLD}\e[1;32m"
RED="${BOLD}\e[1;31m"
YELLOW="${BOLD}\e[1;33m"
fi
fi
readonly ALL_OFF BOLD BLUE GREEN RED YELLOW
if [[ $1 = -@(h|-help) ]]; then
usage
exit 0
elif [[ $1 = -@(V|-version) ]]; then
version
exit 0
fi
# parse arguments
while [[ $# > 0 ]]; do
case $1 in
--directory=*)
_search_dir=${1/--directory=/}
_run_mode=dir
if [[ ! -d $_search_dir ]]; then
print_error "Search directory doesn't exists"
exit 1
fi
;;
--file=*)
_search_file=${1/--file=/}
_run_mode=file
if [[ ! -f $_search_file ]]; then
print_error "File $_search_file doesn't exists"
exit 1
fi
;;
--library=*)
_search_pattern=${1/--library=/}
_search_mode=single
;;
--output=*)
_prog_output=${1/--output=/}
;;
--verbose)
_verbose=1
;;
--help) usage ;;
*)
die "bad command line: \"$1\". terminate."
;;
esac
shift
done
_ext_msg=
if [[ -n $_search_pattern ]]; then
_ext_msg="on $_search_pattern"
fi
if [[ "$_run_mode" = "file" ]]; then
print_msg0 "Scanning file %s for dependencies %s" "$_search_file" "$_ext_msg"
process_binary "$_search_file" "$_search_pattern"
else
print_msg0 "Scanning directory %s for dependencies %s" "$_search_dir" "$_ext_msg"
process_directory "$_search_dir" "$_search_pattern"
fi
exit 0

View File

@ -0,0 +1,3 @@
#
# ~/.bash_logout
#

View File

@ -0,0 +1,42 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# ~/.bash_profile: executed by bash(1) for login shells.
# The latest version as installed by the MSYS2 Setup program can
# always be found at /etc/defaults/etc/skel/.bash_profile
# Modifying /etc/skel/.bash_profile directly will prevent
# setup from updating it.
# The copy in your home directory (~/.bash_profile) is yours, please
# feel free to customise it to create a shell
# environment to your liking. If you feel a change
# would be benifitial to all, please feel free to send
# a patch to the cygwin mailing list.
# User dependent .bash_profile file
# source the users bashrc if it exists
if [ -f "${HOME}/.bashrc" ] ; then
source "${HOME}/.bashrc"
fi
# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
# PATH="${HOME}/bin:${PATH}"
# fi
# Set MANPATH so it includes users' private man if it exists
# if [ -d "${HOME}/man" ]; then
# MANPATH="${HOME}/man:${MANPATH}"
# fi
# Set INFOPATH so it includes users' private info if it exists
# if [ -d "${HOME}/info" ]; then
# INFOPATH="${HOME}/info:${INFOPATH}"
# fi

196
filesystem/dot.bashrc Normal file
View File

@ -0,0 +1,196 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# ~/.bashrc: executed by bash(1) for interactive shells.
# The latest version as installed by the MSYS2 Setup program can
# always be found at /etc/defaults/etc/skel/.bashrc
# Modifying /etc/skel/.bashrc directly will prevent
# setup from updating it.
# The copy in your home directory (~/.bashrc) is yours, please
# feel free to customise it to create a shell
# environment to your liking. If you feel a change
# would be benifitial to all, please feel free to send
# a patch to the cygwin mailing list.
# User dependent .bashrc file
# If not running interactively, don't do anything
[[ "$-" != *i* ]] && return
# Shell Options
#
# See man bash for more options...
#
# Don't wait for job termination notification
# set -o notify
#
# Don't use ^D to exit
# set -o ignoreeof
#
# Use case-insensitive filename globbing
# shopt -s nocaseglob
#
# Make bash append rather than overwrite the history on disk
# shopt -s histappend
#
# When changing directory small typos can be ignored by bash
# for example, cd /vr/lgo/apaache would find /var/log/apache
# shopt -s cdspell
# Completion options
#
# These completion tuning parameters change the default behavior of bash_completion:
#
# Define to access remotely checked-out files over passwordless ssh for CVS
# COMP_CVS_REMOTE=1
#
# Define to avoid stripping description in --option=description of './configure --help'
# COMP_CONFIGURE_HINTS=1
#
# Define to avoid flattening internal contents of tar files
# COMP_TAR_INTERNAL_PATHS=1
#
# Uncomment to turn on programmable completion enhancements.
# Any completions you add in ~/.bash_completion are sourced last.
# [[ -f /etc/bash_completion ]] && . /etc/bash_completion
# History Options
#
# Don't put duplicate lines in the history.
# export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
#
# Ignore some controlling instructions
# HISTIGNORE is a colon-delimited list of patterns which should be excluded.
# The '&' is a special pattern which suppresses duplicate entries.
# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit'
# export HISTIGNORE=$'[ \t]*:&:[fb]g:exit:ls' # Ignore the ls command as well
#
# Whenever displaying the prompt, write the previous line to disk
# export PROMPT_COMMAND="history -a"
# Aliases
#
# Some people use a different file for aliases
# if [ -f "${HOME}/.bash_aliases" ]; then
# source "${HOME}/.bash_aliases"
# fi
#
# Some example alias instructions
# If these are enabled they will be used instead of any instructions
# they may mask. For example, alias rm='rm -i' will mask the rm
# application. To override the alias instruction use a \ before, ie
# \rm will call the real rm not the alias.
#
# Interactive operation...
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'
#
# Default to human readable figures
# alias df='df -h'
# alias du='du -h'
#
# Misc :)
# alias less='less -r' # raw control characters
# alias whence='type -a' # where, of a sort
# alias grep='grep --color' # show differences in colour
# alias egrep='egrep --color=auto' # show differences in colour
# alias fgrep='fgrep --color=auto' # show differences in colour
#
# Some shortcuts for different directory listings
# alias ls='ls -hF --color=tty' # classify files in colour
# alias dir='ls --color=auto --format=vertical'
# alias vdir='ls --color=auto --format=long'
# alias ll='ls -l' # long list
# alias la='ls -A' # all but . and ..
# alias l='ls -CF' #
# Umask
#
# /etc/profile sets 022, removing write perms to group + others.
# Set a more restrictive umask: i.e. no exec perms for others:
# umask 027
# Paranoid: neither group nor others have any perms:
# umask 077
# Functions
#
# Some people use a different file for functions
# if [ -f "${HOME}/.bash_functions" ]; then
# source "${HOME}/.bash_functions"
# fi
#
# Some example functions:
#
# a) function settitle
# settitle ()
# {
# echo -ne "\e]2;$@\a\e]1;$@\a";
# }
#
# b) function cd_func
# This function defines a 'cd' replacement function capable of keeping,
# displaying and accessing history of visited directories, up to 10 entries.
# To use it, uncomment it, source this file and try 'cd --'.
# acd_func 1.0.5, 10-nov-2004
# Petar Marinov, http:/geocities.com/h2428, this is public domain
# cd_func ()
# {
# local x2 the_new_dir adir index
# local -i cnt
#
# if [[ $1 == "--" ]]; then
# dirs -v
# return 0
# fi
#
# the_new_dir=$1
# [[ -z $1 ]] && the_new_dir=$HOME
#
# if [[ ${the_new_dir:0:1} == '-' ]]; then
# #
# # Extract dir N from dirs
# index=${the_new_dir:1}
# [[ -z $index ]] && index=1
# adir=$(dirs +$index)
# [[ -z $adir ]] && return 1
# the_new_dir=$adir
# fi
#
# #
# # '~' has to be substituted by ${HOME}
# [[ ${the_new_dir:0:1} == '~' ]] && the_new_dir="${HOME}${the_new_dir:1}"
#
# #
# # Now change to the new dir and add to the top of the stack
# pushd "${the_new_dir}" > /dev/null
# [[ $? -ne 0 ]] && return 1
# the_new_dir=$(pwd)
#
# #
# # Trim down everything beyond 11th entry
# popd -n +11 2>/dev/null 1>/dev/null
#
# #
# # Remove any other occurence of this dir, skipping the top of the stack
# for ((cnt=1; cnt <= 10; cnt++)); do
# x2=$(dirs +${cnt} 2>/dev/null)
# [[ $? -ne 0 ]] && return 0
# [[ ${x2:0:1} == '~' ]] && x2="${HOME}${x2:1}"
# if [[ "${x2}" == "${the_new_dir}" ]]; then
# popd -n +$cnt 2>/dev/null 1>/dev/null
# cnt=cnt-1
# fi
# done
#
# return 0
# }
#
# alias cd=cd_func

118
filesystem/dot.inputrc Normal file
View File

@ -0,0 +1,118 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# ~/.inputrc: readline initialization file.
# The latest version as installed by the MSYS2 Setup program can
# always be found at /etc/defaults/etc/skel/.inputrc
# Modifying /etc/skel/.inputrc directly will prevent
# setup from updating it.
# The copy in your home directory (~/.inputrc) is yours, please
# feel free to customise it to create a shell
# environment to your liking. If you feel a change
# would be benifitial to all, please feel free to send
# a patch to the cygwin mailing list.
# the following line is actually
# equivalent to "\C-?": delete-char
# "\e[3~": delete-char
# VT
# "\e[1~": beginning-of-line
# "\e[4~": end-of-line
# kvt
# "\e[H": beginning-of-line
# "\e[F": end-of-line
# rxvt and konsole (i.e. the KDE-app...)
# "\e[7~": beginning-of-line
# "\e[8~": end-of-line
# VT220
# "\eOH": beginning-of-line
# "\eOF": end-of-line
# Allow 8-bit input/output
# set meta-flag on
# set convert-meta off
# set input-meta on
# set output-meta on
#$if Bash
# Don't ring bell on completion
set bell-style none
# or, don't beep at me - show me
#set bell-style visible
# Show all instead of beeping first
set show-all-if-ambiguous off
# Filename completion/expansion
set completion-ignore-case on
#set show-all-if-ambiguous on
# Expand homedir name
#set expand-tilde on
# Append "/" to all dirnames
#set mark-directories on
#set mark-symlinked-directories on
# visible-stats
# Append a mark according to the file type in a listing
set visible-stats off
set mark-directories on
# Match all files
#set match-hidden-files on
# 'Magic Space'
# Insert a space character then performs
# a history expansion in the line
#Space: magic-space
#$endif
# MSYSTEM is emacs based
$if mode=emacs
# Common to Console & RXVT
"\C-?": backward-kill-line # Ctrl-BackSpace
"\e[2~": paste-from-clipboard # "Ins. Key"
"\e[5~": beginning-of-history # Page up
"\e[6~": end-of-history # Page down
$if term=msys # RXVT
"\e[7~": beginning-of-line # Home Key
"\e[8~": end-of-line # End Key
"\e[11~": display-shell-version # F1
"\e[15~": re-read-init-file # F5
"\e[12~": "Function Key 2"
"\e[13~": "Function Key 3"
"\e[14~": "Function Key 4"
"\e[17~": "Function Key 6"
"\e[18~": "Function Key 7"
"\e[19~": "Function Key 8"
"\e[20~": "Function Key 9"
"\e[21~": "Function Key 10"
$else
# Eh, normal Console is not really cygwin anymore, is it? Using 'else' instead. -mstormo
# $if term=cygwin # Console
"\e[1~": beginning-of-line # Home Key
"\e[4~": end-of-line # End Key
"\e[3~": delete-char # Delete Key
"\e\e[C": forward-word # Alt-Right
"\e\e[D": backward-word # Alt-Left
"\e[17~": "Function Key 6"
"\e[18~": "Function Key 7"
"\e[19~": "Function Key 8"
"\e[20~": "Function Key 9"
"\e[21~": "Function Key 10"
"\e[23~": "Function Key 11"
$endif
$endif

35
filesystem/dot.profile Normal file
View File

@ -0,0 +1,35 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# ~/.profile: executed by the command interpreter for login shells.
# The latest version as installed by the MSYS2 Setup program can
# always be found at /etc/defaults/etc/skel/.profile
# Modifying /etc/skel/.profile directly will prevent
# setup from updating it.
# The copy in your home directory (~/.profile) is yours, please
# feel free to customise it to create a shell
# environment to your liking. If you feel a change
# would be benificial to all, please feel free to send
# a patch to the cygwin mailing list.
# User dependent .profile file
# Set user-defined locale
export LANG=$(locale -uU)
# This file is not read by bash(1) if ~/.bash_profile or ~/.bash_login
# exists.
#
# if running bash
if [ -n "${BASH_VERSION}" ]; then
if [ -f "${HOME}/.bashrc" ]; then
source "${HOME}/.bashrc"
fi
fi

5
filesystem/fstab Normal file
View File

@ -0,0 +1,5 @@
# For a description of the file format, see the Users Guide
# http://cygwin.com/cygwin-ug-net/using.html#mount-table
# DO NOT REMOVE NEXT LINE. It remove cygdrive prefix from path
none / cygdrive binary,posix=0,noacl,user 0 0

View File

@ -0,0 +1,50 @@
@echo off
rem ember value of GOTO: is used to know recursion has happened.
if "%1" == "GOTO:" goto %2
if NOT "x%WD%" == "x" set WD=
rem ember command.com only uses the first eight characters of the label.
goto _WindowsNT
start /min %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
rem ember that we execute here if we recursed.
:_Resume
for %%F in (1 2 3) do shift
if NOT EXIST %WD%msys-2.0.dll set WD=.\usr\bin\
rem ember that we get here even in command.com.
:_WindowsNT
if NOT EXIST %WD%msys-2.0.dll set WD=%~dp0\usr\bin\
set MSYSTEM=MINGW32
rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict
rem Set debugging program for errors
rem set MSYS=error_start:%WD%../../mingw32/bin/qtcreator.exe|-debug|<process-id>
set MSYSCON=mintty.exe
if "x%1" == "x-consolez" set MSYSCON=console.exe
if "x%1" == "x-mintty" set MSYSCON=mintty.exe
if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xconsole.exe" goto startconsolez
:startmintty
if NOT EXIST %WD%mintty.exe goto startsh
start %WD%mintty -i /msys2.ico /usr/bin/bash --login %*
exit
:startconsolez
cd %WD%..\lib\ConsoleZ
start console -t "MinGW" -r "%*"
exit
:startsh
start %WD%sh --login -i %*
exit
:EOF

View File

@ -0,0 +1,50 @@
@echo off
rem ember value of GOTO: is used to know recursion has happened.
if "%1" == "GOTO:" goto %2
if NOT "x%WD%" == "x" set WD=
rem ember command.com only uses the first eight characters of the label.
goto _WindowsNT
start /min %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
rem ember that we execute here if we recursed.
:_Resume
for %%F in (1 2 3) do shift
if NOT EXIST %WD%msys-2.0.dll set WD=.\usr\bin\
rem ember that we get here even in command.com.
:_WindowsNT
if NOT EXIST %WD%msys-2.0.dll set WD=%~dp0\usr\bin\
set MSYSTEM=MINGW64
rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict
rem Set debugging program for errors
rem set MSYS=error_start:%WD%../../mingw64/bin/qtcreator.exe|-debug|<process-id>
set MSYSCON=mintty.exe
if "x%1" == "x-consolez" set MSYSCON=console.exe
if "x%1" == "x-mintty" set MSYSCON=mintty.exe
if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xconsole.exe" goto startconsolez
:startmintty
if NOT EXIST %WD%mintty.exe goto startsh
start %WD%mintty -i /msys2.ico /usr/bin/bash --login %*
exit
:startconsolez
cd %WD%..\lib\ConsoleZ
start console -t "MinGW" -r "%*"
exit
:startsh
start %WD%sh --login -i %*
exit
:EOF

BIN
filesystem/msys2.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,50 @@
@echo off
rem ember value of GOTO: is used to know recursion has happened.
if "%1" == "GOTO:" goto %2
if NOT "x%WD%" == "x" set WD=
rem ember command.com only uses the first eight characters of the label.
goto _WindowsNT
start /min %COMSPEC% /e:4096 /c %0 GOTO: _Resume %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto EOF
rem ember that we execute here if we recursed.
:_Resume
for %%F in (1 2 3) do shift
if NOT EXIST %WD%msys-2.0.dll set WD=.\usr\bin\
rem ember that we get here even in command.com.
:_WindowsNT
if NOT EXIST %WD%msys-2.0.dll set WD=%~dp0\usr\bin\
set MSYSTEM=MSYS
rem To activate windows native symlinks uncomment next line
rem set MSYS=winsymlinks:nativestrict
rem Set debugging program for errors
rem set MSYS=error_start:%WD%../../mingw32/bin/qtcreator.exe|-debug|<process-id>
set MSYSCON=mintty.exe
if "x%1" == "x-consolez" set MSYSCON=console.exe
if "x%1" == "x-mintty" set MSYSCON=mintty.exe
if "x%MSYSCON%" == "xmintty.exe" goto startmintty
if "x%MSYSCON%" == "xconsole.exe" goto startconsolez
:startmintty
if NOT EXIST %WD%mintty.exe goto startsh
start %WD%mintty -i /msys2.ico /usr/bin/bash --login %*
exit
:startconsolez
cd %WD%..\lib\ConsoleZ
start console -t "MSys2" -r "%*"
exit
:startsh
start %WD%sh --login -i %*
exit
:EOF

15
filesystem/nsswitch.conf Normal file
View File

@ -0,0 +1,15 @@
# Begin /etc/nsswitch.conf
passwd: files
group: files
db_enum: files
publickey: files
hosts: files dns myhostname
networks: files
protocols: files
services: files
# End /etc/nsswitch.conf

499
filesystem/profile Normal file
View File

@ -0,0 +1,499 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# System-wide profile file
# Some resources...
# Customizing Your Shell: http://www.dsl.org/cookbook/cookbook_5.html#SEC69
# Consistent BackSpace and Delete Configuration:
# http://www.ibb.net/~anne/keyboard.html
# The Linux Documentation Project: http://www.tldp.org/
# The Linux Cookbook: http://www.tldp.org/LDP/linuxcookbook/html/
# Greg's Wiki http://mywiki.wooledge.org/
# Setup some default paths. Note that this order will allow user installed
# software to override 'system' software.
# Modifying these default path settings can be done in different ways.
# To learn more about startup files, refer to your shell's man page.
MSYS2_PATH="/usr/local/bin:/usr/bin:/bin"
MANPATH="/usr/local/man:/usr/share/man:/usr/man:/share/man:${MANPATH}"
INFOPATH="/usr/local/info:/usr/share/info:/usr/info:/share/info:${INFOPATH}"
if [ -n "$MSYSTEM" ]
then
case "$MSYSTEM" in
MINGW32)
PATH="/mingw32/bin:${MSYS2_PATH}:${PATH}"
PKG_CONFIG_PATH="/mingw32/lib/pkgconfig"
MANPATH="/mingw32/share/man:${MANPATH}"
;;
MINGW64)
PATH="/mingw64/bin:${MSYS2_PATH}:${PATH}"
PKG_CONFIG_PATH="/mingw64/lib/pkgconfig"
MANPATH="/mingw64/share/man:${MANPATH}"
;;
MSYS)
PATH="${MSYS2_PATH}:/opt/bin:${PATH}"
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/lib/pkgconfig"
;;
*)
PATH="${MSYS2_PATH}:${PATH}"
;;
esac
else
PATH="${MSYS2_PATH}:${PATH}"
fi
MAYBE_FIRST_START=false
SYSCONFDIR="${SYSCONFDIR:=/etc}"
# TMP and TEMP as defined in the Windows environment must be kept
# for windows apps, even if started from cygwin. However, leaving
# them set to the default Windows temporary directory or unset
# can have unexpected consequences for cygwin apps, so we define
# our own to match GNU/Linux behaviour.
ORIGINAL_TMP=$TMP
ORIGINAL_TEMP=$TEMP
unset TMP TEMP
tmp=$(cygpath -w "$ORIGINAL_TMP" 2> /dev/null)
temp=$(cygpath -w "$ORIGINAL_TEMP" 2> /dev/null)
TMP="/tmp"
TEMP="/tmp"
# Define default printer
p='/proc/registry/HKEY_CURRENT_USER/Software/Microsoft/Windows NT/CurrentVersion/Windows/Device'
if [ -e "${p}" ] ; then
read -r PRINTER < "${p}"
PRINTER=${PRINTER%%,*}
fi
unset p
print_flags ()
{
(( $1 & 0x0002 )) && echo -n "binary" || echo -n "text"
(( $1 & 0x0010 )) && echo -n ",exec"
(( $1 & 0x0040 )) && echo -n ",cygexec"
(( $1 & 0x0100 )) && echo -n ",notexec"
}
maybe_create_fstab ()
{
local FSTAB="${SYSCONFDIR}/fstab"
local FSTABDIR="${SYSCONFDIR}/fstab.d"
# Create fstab file if it doesn't exist.
if [ -e "${FSTAB}" -a ! -f "${FSTAB}" ]
then
# Try to move
mv -f "${FSTAB}" "${FSTAB}.orig"
if [ -e "${FSTAB}" -a ! -f "${FSTAB}" ]
then
echo
echo "${FSTAB} is existant but not a file."
echo "Since this file is specifying the mount points, this might"
echo "result in unexpected trouble. Please fix that manually."
echo
fi
fi
if [ ! -e "${FSTAB}" ]
then
# Create fstab default header
cat > ${FSTAB} << EOF
# For a description of the file format, see the Users Guide
# http://cygwin.com/cygwin-ug-net/using.html#mount-table
# DO NOT REMOVE NEXT LINE. It remove cygdrive prefix from path
none / cygdrive binary,posix=0,noacl,user 0 0
EOF
MAYBE_FIRST_START=true
fi
# Check for ${FSTABDIR} directory
if [ -e "${FSTABDIR}" -a ! -d "${FSTABDIR}" ]
then
# No mercy. Try to remove.
rm -f "${FSTABDIR}"
if [ -e "${FSTABDIR}" -a ! -d "${FSTABDIR}" ]
then
echo
echo "${FSTABDIR} is existant but not a directory."
echo "Please fix that manually."
echo
exit 1
fi
fi
# Create it if necessary
if [ ! -e "${FSTABDIR}" ]
then
mkdir -m 1777 "${FSTABDIR}"
if [ ! -e "${FSTABDIR}" ]
then
echo
echo "Creating ${FSTABDIR} directory failed."
echo "Please fix that manually."
echo
exit 1
fi
fi
}
maybe_create_mtab ()
{
local MTAB="${SYSCONFDIR}/mtab"
# Create /etc/mtab as symlink to /proc/mounts
[ ! -L "${MTAB}" ] && ln -sf /proc/mounts ${MTAB}
}
maybe_create_devs ()
{
local DEVDIR=/dev
# Check for ${DEVDIR} directory
if [ -e "${DEVDIR}" -a ! -d "${DEVDIR}" ]
then
# No mercy. Try to remove.
rm -f "${DEVDIR}"
if [ -e "${DEVDIR}" -a ! -d "${DEVDIR}" ]
then
echo
echo "${DEVDIR} is existant but not a directory."
echo "Please fix that manually, otherwise you WILL get problems."
echo
exit 1
fi
fi
# Create it if necessary
mkdir -m 755 "${DEVDIR}" 2> /dev/null
if [ ! -e "${DEVDIR}" ]
then
echo
echo "Creating ${DEVDIR} directory failed."
echo "Please fix that manually, otherwise you WILL get problems."
echo
exit 1
fi
# Check for ${DEVDIR}/shm directory (for POSIX semaphores and POSIX shared mem)
if [ -e "${DEVDIR}/shm" -a ! -d "${DEVDIR}/shm" ]
then
# No mercy. Try to remove.
rm -f "${DEVDIR}/shm"
if [ -e "${DEVDIR}/shm" -a ! -d "${DEVDIR}/shm" ]
then
echo
echo "${DEVDIR}/shm is existant but not a directory."
echo "POSIX semaphores and POSIX shared memory will not work"
echo
fi
fi
# Create it if necessary
if [ ! -e "${DEVDIR}/shm" ]
then
mkdir -m 1777 "${DEVDIR}/shm"
if [ ! -e "${DEVDIR}/shm" ]
then
echo
echo "Creating ${DEVDIR}/shm directory failed."
echo "POSIX semaphores and POSIX shared memory will not work"
echo
fi
else
chmod 1777 "${DEVDIR}/shm"
fi
# Check for ${DEVDIR}/mqueue directory (for POSIX message queues)
if [ -e "${DEVDIR}/mqueue" -a ! -d "${DEVDIR}/mqueue" ]
then
# No mercy. Try to remove.
rm -f "${DEVDIR}/mqueue"
if [ -e "${DEVDIR}/mqueue" -a ! -d "${DEVDIR}/mqueue" ]
then
echo
echo "${DEVDIR}/mqueue is existant but not a directory."
echo "POSIX message queues will not work"
echo
fi
fi
# Create it if necessary
if [ ! -e "${DEVDIR}/mqueue" ]
then
mkdir -m 1777 "${DEVDIR}/mqueue"
if [ ! -e "${DEVDIR}/mqueue" ]
then
echo
echo "Creating ${DEVDIR}/mqueue directory failed."
echo "POSIX message queues will not work"
echo
fi
else
chmod 1777 "${DEVDIR}/mqueue"
fi
# Install /dev/fd, /dev/std{in,out,err}. The bash builtin test was compiled
# to assume these exist, so use /bin/test to really check.
/usr/bin/test -h /dev/stdin || ln -sf /proc/self/fd/0 /dev/stdin
/usr/bin/test -h /dev/stdout || ln -sf /proc/self/fd/1 /dev/stdout
/usr/bin/test -h /dev/stderr || ln -sf /proc/self/fd/2 /dev/stderr
/usr/bin/test -h /dev/fd || ln -sf /proc/self/fd /dev/fd
}
maybe_create_passwd ()
{
# Create default /etc/passwd and /etc/group files
local created_passwd=no
local created_group=no
if [ ! -e /etc/passwd -a ! -L /etc/passwd ] ; then
mkpasswd.exe -l -c > /etc/passwd
chmod 644 /etc/passwd
created_passwd=yes
MAYBE_FIRST_START=true
fi
if [ ! -e /etc/group -a ! -L /etc/group ] ; then
mkgroup.exe -l -c > /etc/group
chmod 644 /etc/group
created_group=yes
MAYBE_FIRST_START=true
fi
cp -fp /etc/group /tmp/group.mkgroup && \
( [ -w /etc/group ] || chmod --silent a+w /etc/group ; ) && \
echo "root:S-1-5-32-544:0:" > /etc/group && \
sed -e '/root:S-1-5-32-544:0:/d' /tmp/group.mkgroup >> /etc/group && \
chmod --silent --reference=/etc/passwd /etc/group
rm -f /tmp/group.mkgroup
# Deferred to be sure root group entry exists
[ "$created_passwd" = "yes" ] && chgrp --silent root /etc/passwd
[ "$created_group" = "yes" ] && chgrp --silent root /etc/group
}
maybe_create_winetc ()
{
local FILES="hosts protocols services networks"
local WINSYS32HOME="$(/usr/bin/cygpath -S -w)"
local WINETC="${WINSYS32HOME}\\drivers\\etc"
if [ ! -d "${WINETC}" ]; then
echo "Directory ${WINETC} does not exist; exiting" >&2
echo "If directory name is garbage you need to update your msys package" >&2
exit 1
fi
local mketc=
for mketc in ${FILES}
do
if [ ! -e "/etc/${mketc}" -a ! -L "/etc/${mketc}" ]
then
# Windows only uses the first 8 characters
local WFILE="${WINETC}\\$(expr substr "${mketc}" 1 8)"
/usr/bin/cp -p -v "${WFILE}" "/etc/${mketc}"
fi
done
/usr/bin/chmod 1777 /tmp 2>/dev/null
}
maybe_create_home ()
{
# Set the user id
USER="$(id -un)"
# Default to removing the write permission for group and other
# (files normally created with mode 777 become 755; files created with
# mode 666 become 644)
umask 022
# Here is how HOME is set, in order of priority, when starting from Windows
# 1) From existing HOME in the Windows environment, translated to a Posix path
# 2) from /etc/passwd, if there is an entry with a non empty directory field
# 3) from HOMEDRIVE/HOMEPATH
# 4) / (root)
# If the home directory doesn't exist, create it.
if [ ! -d "${HOME}" ]; then
if mkdir -p "${HOME}"; then
echo "Copying skeleton files."
echo "These files are for the users to personalise their cygwin experience."
echo
echo "They will never be overwritten nor automatically updated."
echo
cd /etc/skel || echo "WARNING: Failed attempt to cd into /etc/skel!"
local f=
/usr/bin/find . -type f | while read f; do
local fDest=${f#.}
if [ ! -e "${HOME}${fDest}" -a ! -L "${HOME}${fDest}" ]; then
/usr/bin/install -D -p -v "${f}" "${HOME}/${fDest}"
fi
done
else
echo "${HOME} could not be created."
{ [ -d "${TEMP}" ] && HOME="${TEMP}"; } ||
{ [ -d "${TMP}" ] && HOME="${TMP}"; } ||
{ [ -d /tmp ] && HOME=/tmp; } ||
HOME=/
echo "Setting HOME to ${HOME}."
fi
fi
# Start MSYS in selected folder
# c:\msys\usr\bin\bash -c "cd '%curdir'; export
# CHERE_INVOKING=1; exec /usr/bin/bash --login -i"
#
# Make sure we start in home unless invoked by CHERE
if [ ! -z "${CHERE_INVOKING}" ]; then
unset CHERE_INVOKING
else
cd "${HOME}" || echo "WARNING: Failed attempt to cd into ${HOME}!"
fi
}
# Call functions
maybe_create_fstab
maybe_create_mtab
maybe_create_devs
maybe_create_passwd
maybe_create_winetc
maybe_create_home
# Shell dependent settings
profile_d ()
{
local file=
for file in $(export LC_COLLATE=C; echo /etc/profile.d/*.$1); do
[ -e "${file}" ] && . "${file}"
done
}
if [ ! "x${BASH_VERSION}" = "x" ]; then
HOSTNAME="$(/usr/bin/hostname)"
profile_d sh
[ -f "/etc/bash.bashrc" ] && . "/etc/bash.bashrc"
elif [ ! "x${KSH_VERSION}" = "x" ]; then
typeset -l HOSTNAME="$(/usr/bin/hostname)"
profile_d sh
PS1=$(print '\033]0;${PWD}\n\033[32m${USER}@${HOSTNAME} \033[33m${PWD/${HOME}/~}\033[0m\n$ ')
elif [ ! "x${ZSH_VERSION}" = "x" ]; then
HOSTNAME="$(/usr/bin/hostname)"
profile_d zsh
PS1='(%n@%m)[%h] %~ %% '
elif [ ! "x${POSH_VERSION}" = "x" ]; then
HOSTNAME="$(/usr/bin/hostname)"
PS1="$ "
else
HOSTNAME="$(/usr/bin/hostname)"
profile_d sh
PS1="$ "
fi
export PATH MANPATH INFOPATH PKG_CONFIG_PATH USER TMP TEMP PRINTER HOSTNAME PS1 SHELL tmp temp
export TERM=xterm-256color
# Check to see if mkpasswd/mkgroup needs to be run try and cut down the emails
# about this on the lists!
#
# The following are the conditions under which the group name special cases
# will appear (where uid and gid are the effective user and group ids
# for the current user, and pgsid is the primary group associated with the
# SID for the current user):
# mkpasswd:
# gid is not in /etc/group
# uid is not in /etc/passwd
# passwd/group_GID_clash(<gid>/<pgsid>):
# gid is not in /etc/group
# uid is in /etc/passwd
# pgsid is in /etc/group (and does not match gid)
# mkgroup:
# gid is not in /etc/group
# uid is in /etc/passwd
# pgsid is not in /etc/group
#
# If this message keeps appearing and you are sure it's a mistake (ie, don't
# email about it!), comment out the test below.
case "$(id -ng)" in
mkpasswd )
echo "Your group is currently \"mkpasswd\". This indicates that your"
echo "gid is not in /etc/group and your uid is not in /etc/passwd."
echo
echo "The /etc/passwd (and possibly /etc/group) files should be rebuilt."
echo "See the man pages for mkpasswd and mkgroup then, for example, run"
echo
echo "mkpasswd -l [-d] > /etc/passwd"
echo "mkgroup -l [-d] > /etc/group"
echo
echo "Note that the -d switch is necessary for domain users."
;;
passwd/group_GID_clash* )
echo "Your group is currently \"passwd/group_GID_clash(gid/pgsid)\". This"
echo "indicates that your gid is not in /etc/group, but the pgsid (primary "
echo "group associated with your SID) is in /etc/group."
echo
echo "The /etc/passwd (and possibly /etc/group) files should be rebuilt."
echo "See the man pages for mkpasswd and mkgroup then, for example, run"
echo
echo "mkpasswd -l [-d] > /etc/passwd"
echo "mkgroup -l [-d] > /etc/group"
echo
echo "Note that the -d switch is necessary for domain users."
;;
mkgroup )
echo "Your group is currently \"mkgroup\". This indicates that neither"
echo "your gid nor your pgsid (primary group associated with your SID)"
echo "is in /etc/group."
echo
echo "The /etc/group (and possibly /etc/passwd) files should be rebuilt."
echo "See the man pages for mkpasswd and mkgroup then, for example, run"
echo
echo "mkpasswd -l [-d] > /etc/passwd"
echo "mkgroup -l [-d] > /etc/group"
echo
echo "Note that the -d switch is necessary for domain users."
;;
esac
if [ "$MAYBE_FIRST_START" = "true" ]; then
sh /usr/sbin/regen-info.sh
if [ -f "/usr/bin/update-ca-trust" ]
then
sh /usr/bin/update-ca-trust
fi
if [ -f "/usr/bin/xmlcatalog" ]
then
/usr/bin/mkdir -p /etc/xml
/usr/bin/xmlcatalog --noout --create /etc/xml/catalog
fi
clear
echo
echo
echo "###################################################################"
echo "# #"
echo "# #"
echo "# C A U T I O N #"
echo "# #"
echo "# This is first start of MSYS2. #"
echo "# You MUST restart shell to apply necessary actions. #"
echo "# #"
echo "# #"
echo "###################################################################"
echo
echo
fi
unset MAYBE_FIRST_START

View File

@ -0,0 +1,19 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# /etc/profile.d/lang.sh: sourced by /etc/profile.
# The latest version as installed by the MSYS2 Setup program can
# always be found at /etc/defaults/etc/profile.d/lang.sh
# Modifying /etc/profile.d/lang.sh directly will prevent
# setup from updating it.
# System-wide lang.sh file
# if no locale variable is set, indicate terminal charset via LANG
test -z "${LC_ALL:-${LC_CTYPE:-$LANG}}" && export LANG=$(/usr/bin/locale -uU)

View File

@ -0,0 +1,22 @@
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
# You should have received a copy of the CC0 Public Domain Dedication along
# with this software.
# If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
# /etc/profile.d/tzset.sh: sourced by /etc/profile.
# The latest version as installed by the MSYS2 Setup program can
# always be found at /etc/defaults/etc/profile.d/tzset.sh
# Modifying /etc/profile.d/tzset.sh directly will prevent
# setup from updating it.
# System-wide tzset.sh file
#Uses the geographical location setting of the user to find the right
#mapping, rather than the locale setting. Only on Windows 2000 which
#doesn't know about the user's geographical location, or if fetching
#the geographical location fails, it falls back to the user's locale.
test -z "$TZ" && export TZ=$(/usr/bin/tzset)

12
filesystem/regen-info.sh Normal file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
INFODIR=/usr/share/info
rm -f $INFODIR/dir
for F in $INFODIR/*.info.gz; do
echo -n "--> Installing $F ..."
/usr/bin/install-info --info-file=$F --dir-file=$INFODIR/dir
echo " done"
done
exit 0

8
filesystem/shells Normal file
View File

@ -0,0 +1,8 @@
#
# /etc/shells
#
/usr/bin/sh
/usr/bin/bash
# End of file

8
filesystem/start Normal file
View File

@ -0,0 +1,8 @@
#!/usr/bin/env bash
# Copyright (C) 2014, Alexey Pavlov
# mailto:alexpux@gmail.com
# This file is part of Minimal SYStem version 2.
# https://sourceforge.net/p/msys2/wiki/MSYS2%20installation/
# File: start
cmd //c start "${@//&/^&}"