-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathscrap-cygwin.txt
141 lines (66 loc) · 4.38 KB
/
scrap-cygwin.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# ATTENTION: NOTICE: See .github/workflows/build.yml , _lib/kit/install/cloud/zSpecial/msw/build_ubcp/build_ubcp_powershell.ps1 .
# Symbolic links are correctly packaged *within* Cygwin (as with 'cygwinOnly' packages), and can be extracted correctly *within* Cygwin. MSW package compression/decompression software (eg. 'tar' from PowerShell, MSW 'zip', 7zip) may NOT commonly support symlinks, causing subtle, severe, deficiencies. Also, Cygwin has a very interesting root filesystem of unusual relative symbolic links by default.
# CAUTION: DANGER: Many workarounds and mitigations for Cygwin/MSW symbolic link issues are subtly, severely, necessary . Build and test 'ubcp' packages carefully to avoid and detect such deficiencies, especially with regard to avoiding any functionality that might change in future versions of MSW and third-party software.
-
# Rough description, not exact commands.
# Install git for windows . Also, nmap, qalculate, may be useful.
git clone --recursive --depth 1 <ubiquitousBashURL>
cd ./_local/ubcp
./ubcp-cygwin-portable-installer
cp ubcp_rename-to-enable.cmd ubcp.cmd
# Use _bash.bat to open a Cygwin/MSW terminal, as this seems not to close.
# Run '_setupUbiquitous' in some way.
# '_bin' with no '.bat' extension seems to be usable in CMD shell after 'setupUbiquitous'
_bin _mitigate-ubcp
_bin _package-cygwinOnly
_bin _setup_ubcp
# Mitigate is very slow, approximately 7 hours.
# Shortcut '_bash.bat' is installed by '_setupUbiquitous' regardless of whether 'core' installation is available. Request should be issued that user not attempt to use such resources until '_setup_ubcp' complete .
-
cd C:
cd \core\infrastructure
mkdir lean
mkdir lean\_local
cd \core\infrastructure\lean\_local
copy X:\_local\ubcp\ubcp-cygwin-portable-installer.cmd
REM tskill ssh-pageant
REM remove any existing ' C:\core\infrastructure\ubcp '
REM run ' ubcp-cygwin-portable-installer.cmd ' multiple times to ensure completion
REM Installation may complain about 'awk' and such not found although these resources may nevertheless be installed correctly .
REM replace files under 'cygwin' with files under 'overlay/cygwin'
REM copy missing directories/files from 'X:\' to ' C:\core\infrastructure\lean ' and ' C:\core\infrastructure\lean\_local\ubcp ' .
REM may need to run these commands from local disk with no spaces (ie. ' C:\core\infrastructure\lean ' instead of network mount
REM will need to copy 'ubcp' dir to '_local/ubcp'
REM best done from a '_bash.bat' shell due to undesirable clearing of screen after command exit from 'cmd'
./lean.sh _mitigate-ubcp
./lean.sh _package-cygwinOnly
REM copy resulting 'ubcp' installation to ' C:\core\infrastructure\ubcp ' .
_bin _setup_ubcp
_bin _setupUbiquitous_noNet
_
uname -a | grep -i cygwin > /dev/null 2>&1
./firefox.exe $(cygpath -w "/cygdrive/x/license.txt")
#https://stackoverflow.com/questions/31192010/cygwin-binary-exec-format-error
export ARCH = CYGNUS
#https://superuser.com/questions/304541/how-to-install-new-packages-on-cygwin
#https://stackoverflow.com/questions/4090301/root-user-sudo-equivalent-in-cygwin
cygstart --action=runas "$@"
#https://codingwithspike.wordpress.com/2012/08/02/making-a-truly-portable-cygwin-install-working-around-drive-letter-and-file-permission-issues/
#https://en.wikipedia.org/wiki/Shebang_(Unix)
'python3 -c will be passed as one argument to /usr/bin/env, rather than two arguments. Cygwin also behaves this way.'
#https://stackoverflow.com/questions/6811435/why-does-cygwin-execute-shell-commands-very-slowly
#https://www.puttygen.com/windows-terminal-emulators
# "conemu" does not apparently show a performance benefit with ... time for i in {1..1000} ; do echo "Hello" ; done
# "mintty" does not apparently show any performance benefit with './lean.sh _benchmark_page'
time for i in {1..1000} ; do echo "Hello" ; done
...
Hello
Hello
real 0m0.584s
user 0m0.031s
sys 0m0.000s
# "conemu" fails here (lean.sh)
[[ ! -e "$scriptAbsoluteLocation" ]] && _messagePlain_bad 'missing: scriptAbsoluteLocation= '"$scriptAbsoluteLocation" | _user_log-ub && exit 1
[[ "$sessionid" == "" ]] && _messagePlain_bad 'missing: sessionid' | _user_log-ub && exit 1
#https://unix.stackexchange.com/questions/482725/shell-is-it-possible-to-delay-a-command-without-using-sleep
time for i in {1..10} ; do true ; coproc read -t 0.001 > /dev/null 2>&1 && wait "$!" > /dev/null 2>&1 || true > /dev/null 2>&1 ; done