-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunpack.hl
More file actions
515 lines (444 loc) · 19.1 KB
/
unpack.hl
File metadata and controls
515 lines (444 loc) · 19.1 KB
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
// curl
;; ─── Ścieżki systemowe ───────────────────────────────────────────────────────
% hackeros_share = /usr/share/HackerOS
% hackeros_old = /usr/share/HackerOS_old
% hackeros_new = /tmp/HackerOS_New
% hackeros_src = /tmp/HackerOS-Updates/HackerOS
% scripts_bin = /usr/share/HackerOS/Scripts/Bin
% scripts_steam = /usr/share/HackerOS/Scripts/Steam
% apps_dir = /usr/share/HackerOS/Scripts/HackerOS-Apps
% games_dir = /usr/share/HackerOS/Scripts/HackerOS-Games
;; ─── Ścieżki pobierania ───────────────────────────────────────────────────────
% release_cli = https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4
% release_apps = https://github.com/HackerOS-Linux-System
% hl_bin = /usr/bin/hl
;; ─── Nagłówek ─────────────────────────────────────────────────────────────────
::nl
::hr 52
::bold HackerOS System Update
::hr 52
::nl
;; ════════════════════════════════════════════════════════════════════════════════
;; 1. ATOMOWA PODMIANA STRUKTURY (Zlota Kopia)
;; ════════════════════════════════════════════════════════════════════════════════
~> [1/8] Weryfikacja paczki aktualizacji...
::exists @hackeros_src
? ok
~> Paczka dostepna - podmieniam strukture...
^>> cp -r @hackeros_src @hackeros_new
? ok
^>> mv @hackeros_share @hackeros_old
^>> mv @hackeros_new @hackeros_share
^> rm -rf /usr/share/HackerOS_old
::green Struktura zaktualizowana atomowo v
done
? err
^> rm -rf /tmp/HackerOS_New
::red BLAD: Podmiana nie powiodla sie - stara wersja zachowana
done
done
? err
::yellow Brak paczki w @hackeros_src - pomijam podmiane struktury
done
;; ════════════════════════════════════════════════════════════════════════════════
;; 2. UPRAWNIENIA SKRYPTOW SYSTEMOWYCH
;; ════════════════════════════════════════════════════════════════════════════════
~> [2/8] Ustawianie uprawnien skryptow...
::exists @scripts_bin
? ok
^>> chmod 755 @scripts_bin/Bit-Jump.sh
^>> chmod 755 @scripts_bin/check_updates_notify.sh
^>> chmod 755 @scripts_bin/HackerOS-Games.sh
^>> chmod 755 @scripts_bin/Proton-Updater.sh
^>> chmod 755 @scripts_bin/update_system.sh
^>> chmod 755 @scripts_bin/update-hackeros.sh
^>> chmod 755 @scripts_bin/update-wallpapers.sh
^>> chown -R root:root @scripts_bin
::green Scripts/Bin v
done
::exists @scripts_steam
? ok
^>> chmod 755 @scripts_steam/HackerOS-Steam.sh
^>> chmod 755 @scripts_steam/HackerOS-Steam-Animation.sh
^>> mkdir -p @scripts_steam/bin
~> Pobieranie HackerOS-Steam GUI...
^>> curl -fLS -o @scripts_steam/bin/gui.new "https://github.com/HackerOS-Linux-System/HackerOS-Steam/releases/download/v0.4/gui"
? ok
^>> mv @scripts_steam/bin/gui.new @scripts_steam/bin/gui
^>> chmod 755 @scripts_steam/bin/gui
::green Steam GUI v
done
? err
^>> rm -f @scripts_steam/bin/gui.new
::yellow Steam GUI - pomijam (404)
done
~> Pobieranie HackerOS-Steam TUI...
^>> curl -fLS -o @scripts_steam/bin/tui.new "https://github.com/HackerOS-Linux-System/HackerOS-Steam/releases/download/v0.4/tui"
? ok
^>> mv @scripts_steam/bin/tui.new @scripts_steam/bin/tui
^>> chmod 755 @scripts_steam/bin/tui
::green Steam TUI v
done
? err
^>> rm -f @scripts_steam/bin/tui.new
::yellow Steam TUI - pomijam (404)
done
^>> chown -R root:root @scripts_steam
::green Scripts/Steam v
done
;; ════════════════════════════════════════════════════════════════════════════════
;; 3. APLIKACJE HACKEROS
;; ════════════════════════════════════════════════════════════════════════════════
~> [3/8] Aktualizacja aplikacji HackerOS...
^>> mkdir -p @apps_dir
~> Pobieranie HackerOS-Game-Mode...
^>> curl -fLS -o @apps_dir/HackerOS-Game-Mode.AppImage.new "@release_apps/HackerOS-Game-Mode/releases/download/v0.2/HackerOS-Game-Mode.AppImage"
? ok
^>> mv @apps_dir/HackerOS-Game-Mode.AppImage.new @apps_dir/HackerOS-Game-Mode.AppImage
^>> chmod 755 @apps_dir/HackerOS-Game-Mode.AppImage
::green HackerOS-Game-Mode v
done
? err
^>> rm -f @apps_dir/HackerOS-Game-Mode.AppImage.new
::yellow HackerOS-Game-Mode - pomijam
done
~> Pobieranie Hacker_Launcher...
^>> curl -fLS -o @apps_dir/Hacker_Launcher.new "@release_apps/Hacker-Launcher/releases/download/v0.8/Hacker_Launcher"
? ok
^>> mv @apps_dir/Hacker_Launcher.new @apps_dir/Hacker_Launcher
^>> chmod 755 @apps_dir/Hacker_Launcher
::green Hacker_Launcher v
done
? err
^>> rm -f @apps_dir/Hacker_Launcher.new
::yellow Hacker_Launcher - pomijam
done
~> Pobieranie HackerOS-Welcome...
^>> curl -fLS -o @apps_dir/HackerOS-Welcome.new "@release_apps/HackerOS-Welcome/releases/download/v0.5/HackerOS-Welcome"
? ok
^>> mv @apps_dir/HackerOS-Welcome.new @apps_dir/HackerOS-Welcome
^>> chmod 755 @apps_dir/HackerOS-Welcome
::green HackerOS-Welcome v
done
? err
^>> rm -f @apps_dir/HackerOS-Welcome.new
::yellow HackerOS-Welcome - pomijam
done
~> Pobieranie Hacker-Term v0.7...
^>> curl -fLS -o @apps_dir/Hacker-Term.new "@release_apps/Hacker-Term/releases/download/v0.7/Hacker-Term"
? ok
^>> mv @apps_dir/Hacker-Term.new @apps_dir/Hacker-Term
^>> chmod 755 @apps_dir/Hacker-Term
::green Hacker-Term v0.7 v
done
? err
^>> rm -f @apps_dir/Hacker-Term.new
::yellow Hacker-Term - pomijam
done
~> Pobieranie HackerOS-Store...
^>> curl -fLS -o @apps_dir/HackerOS-Store.new "@release_apps/HackerOS-Store/releases/download/v0.5/HackerOS-Store"
? ok
^>> mv @apps_dir/HackerOS-Store.new @apps_dir/HackerOS-Store
^>> chmod 755 @apps_dir/HackerOS-Store
::green HackerOS-Store v
done
? err
^>> rm -f @apps_dir/HackerOS-Store.new
::yellow HackerOS-Store - pomijam
done
^>> chown -R root:root @apps_dir
::green Aplikacje zaktualizowane v
;; ════════════════════════════════════════════════════════════════════════════════
;; 4. GRY HACKEROS
;; ════════════════════════════════════════════════════════════════════════════════
~> [4/8] Aktualizacja gier HackerOS...
^>> mkdir -p @games_dir
~> Pobieranie HackerOS-Games...
^>> curl -fLS -o @games_dir/HackerOS-Games.AppImage.new "@release_apps/HackerOS-Games/releases/download/v0.6/HackerOS-Games"
? ok
^>> mv @games_dir/HackerOS-Games.AppImage.new @games_dir/HackerOS-Games.AppImage
^>> chmod 755 @games_dir/HackerOS-Games.AppImage
::green HackerOS-Games v
done
? err
^>> rm -f @games_dir/HackerOS-Games.AppImage.new
::yellow HackerOS-Games - pomijam
done
~> Pobieranie the-racer...
^>> curl -fLS -o @games_dir/the-racer.new "@release_apps/HackerOS-Games/releases/download/v0.5/the-racer"
? ok
^>> mv @games_dir/the-racer.new @games_dir/the-racer
^>> chmod 755 @games_dir/the-racer
::green the-racer v
done
? err
^>> rm -f @games_dir/the-racer.new
::yellow the-racer - pomijam
done
~> Pobieranie starblaster...
^>> curl -fLS -o @games_dir/starblaster.new "@release_apps/HackerOS-Games/releases/download/v0.6/starblaster"
? ok
^>> mv @games_dir/starblaster.new @games_dir/starblaster
^>> chmod 755 @games_dir/starblaster
::green starblaster v
done
? err
^>> rm -f @games_dir/starblaster.new
::yellow starblaster - pomijam
done
~> Pobieranie bit-jump...
^>> curl -fLS -o @games_dir/bit-jump.love.new "@release_apps/HackerOS-Games/releases/download/v0.6/bit-jump.love"
? ok
^>> mv @games_dir/bit-jump.love.new @games_dir/bit-jump.love
^>> chmod 755 @games_dir/bit-jump.love
::green bit-jump v
done
? err
^>> rm -f @games_dir/bit-jump.love.new
::yellow bit-jump - pomijam
done
~> Pobieranie bark-squadron...
^>> curl -fLS -o @games_dir/bark-squadron.AppImage.new "@release_apps/HackerOS-Games/releases/download/v0.6/bark-squadron.AppImage"
? ok
^>> mv @games_dir/bark-squadron.AppImage.new @games_dir/bark-squadron.AppImage
^>> chmod 755 @games_dir/bark-squadron.AppImage
::green bark-squadron v
done
? err
^>> rm -f @games_dir/bark-squadron.AppImage.new
::yellow bark-squadron - pomijam
done
^>> chown -R root:root @games_dir
::green Gry zaktualizowane v
;; ════════════════════════════════════════════════════════════════════════════════
;; 5. NARZEDZIA CLI /usr/bin/
;; ════════════════════════════════════════════════════════════════════════════════
~> [5/8] Aktualizacja narzedzi CLI...
~> Pobieranie hedit...
^> curl -fLS -o /usr/bin/hedit.new "https://github.com/HackerOS-Linux-System/hedit/releases/download/v0.4/hedit"
? ok
^> mv /usr/bin/hedit.new /usr/bin/hedit
^> chmod 755 /usr/bin/hedit
^> chown root:root /usr/bin/hedit
::green hedit v
done
? err
^> rm -f /usr/bin/hedit.new
::yellow hedit - pomijam
done
~> Pobieranie ngt...
^> curl -fLS -o /usr/bin/ngt.new "https://github.com/HackerOS-Linux-System/ngt/releases/download/v0.4/ngt"
? ok
^> mv /usr/bin/ngt.new /usr/bin/ngt
^> chmod 755 /usr/bin/ngt
^> chown root:root /usr/bin/ngt
::green ngt v
done
? err
^> rm -f /usr/bin/ngt.new
::yellow ngt - pomijam
done
~> Pobieranie hacker...
^> curl -fLS -o /usr/bin/hacker.new "https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4/hacker"
? ok
^> mv /usr/bin/hacker.new /usr/bin/hacker
^> chmod 755 /usr/bin/hacker
^> chown root:root /usr/bin/hacker
::green hacker v
done
? err
^> rm -f /usr/bin/hacker.new
::yellow hacker - pomijam
done
~> Pobieranie hpm...
^> curl -fLS -o /usr/bin/hpm.new "https://github.com/HackerOS-Linux-System/HackerOS-Package-Manager/releases/download/v0.7/hpm"
? ok
^> mv /usr/bin/hpm.new /usr/bin/hpm
^> chmod 755 /usr/bin/hpm
^> chown root:root /usr/bin/hpm
::green hpm v
done
? err
^> rm -f /usr/bin/hpm.new
::yellow hpm - pomijam
done
~> Pobieranie hackeros-steam...
^> curl -fLS -o /usr/bin/hackeros-steam.new "https://github.com/HackerOS-Linux-System/HackerOS-Steam/releases/download/v0.3/hackeros-steam"
? ok
^> mv /usr/bin/hackeros-steam.new /usr/bin/hackeros-steam
^> chmod 755 /usr/bin/hackeros-steam
^> chown root:root /usr/bin/hackeros-steam
::green hackeros-steam v
done
? err
^> rm -f /usr/bin/hackeros-steam.new
::yellow hackeros-steam - pomijam
done
~> Pobieranie hbuild...
^> curl -fLS -o /usr/bin/hbuild.new "https://github.com/HackerOS-Linux-System/hbuild/releases/download/v0.3/hbuild"
? ok
^> mv /usr/bin/hbuild.new /usr/bin/hbuild
^> chmod 755 /usr/bin/hbuild
^> chown root:root /usr/bin/hbuild
::green hbuild v
done
? err
^> rm -f /usr/bin/hbuild.new
::yellow hbuild - pomijam
done
~> Pobieranie a...
^> curl -fLS -o /usr/bin/a.new "https://github.com/HackerOS-Linux-System/a/releases/download/v0.2/a"
? ok
^> mv /usr/bin/a.new /usr/bin/a
^> chmod 755 /usr/bin/a
^> chown root:root /usr/bin/a
::green a v
done
? err
^> rm -f /usr/bin/a.new
::yellow a - pomijam
done
~> Pobieranie getit...
^> curl -fLS -o /usr/bin/getit.new "https://github.com/HackerOS-Linux-System/ghdir/releases/download/v0.4/getit"
? ok
^> mv /usr/bin/getit.new /usr/bin/getit
^> chmod 755 /usr/bin/getit
^> chown root:root /usr/bin/getit
::green getit v
done
? err
^> rm -f /usr/bin/getit.new
::yellow getit - pomijam
done
~> Pobieranie chker...
^> curl -fLS -o /usr/bin/chker.new "https://github.com/HackerOS-Linux-System/chker/releases/download/v0.1/chker"
? ok
^> mv /usr/bin/chker.new /usr/bin/chker
^> chmod 755 /usr/bin/chker
^> chown root:root /usr/bin/chker
::green chker v
done
? err
^> rm -f /usr/bin/chker.new
::yellow chker - pomijam
done
~> Pobieranie hsh...
^> curl -fLS -o /usr/bin/hsh.new "https://github.com/HackerOS-Linux-System/hsh/releases/download/v0.4/hsh"
? ok
^> mv /usr/bin/hsh.new /usr/bin/hsh
^> chmod 755 /usr/bin/hsh
^> chown root:root /usr/bin/hsh
::green hsh v
done
? err
^> rm -f /usr/bin/hsh.new
::yellow hsh - pomijam
done
::green Narzedzia CLI zaktualizowane v
;; ════════════════════════════════════════════════════════════════════════════════
;; 6. KONFIGURACJA UZYTKOWNIKA
;; UWAGA: HL executor nie rozwiazuje $HOME ani ~ w zmiennych
;; Uzywamy bash -c aby powloka rozwiazala $HOME poprawnie
;; ════════════════════════════════════════════════════════════════════════════════
~> [6/8] Aktualizacja konfiguracji uzytkownika...
;; Tworzymy katalog przez bash (jedyna metoda zeby $HOME bylo rozwiazane)
> bash -c "mkdir -p $HOME/.hackeros/hacker"
;; Pobieramy do /tmp z prefiksem hl- zeby uniknac kolizji
;; a potem przenosimy przez bash -c z $HOME
> curl -fLS -o /tmp/hl-hacker-shell "https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4/hacker-shell"
? ok
> bash -c "mv /tmp/hl-hacker-shell $HOME/.hackeros/hacker/hacker-shell && chmod 755 $HOME/.hackeros/hacker/hacker-shell"
::green hacker-shell v
done
? err
> rm -f /tmp/hl-hacker-shell
::yellow hacker-shell - pomijam
done
> curl -fLS -o /tmp/hl-hacker-repair "https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4/hacker-repair"
? ok
> bash -c "mv /tmp/hl-hacker-repair $HOME/.hackeros/hacker/hacker-repair && chmod 755 $HOME/.hackeros/hacker/hacker-repair"
::green hacker-repair v
done
? err
> rm -f /tmp/hl-hacker-repair
::yellow hacker-repair - pomijam
done
> curl -fLS -o /tmp/hl-hacker-help "https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4/hacker-help"
? ok
> bash -c "mv /tmp/hl-hacker-help $HOME/.hackeros/hacker/hacker-help && chmod 755 $HOME/.hackeros/hacker/hacker-help"
::green hacker-help v
done
? err
> rm -f /tmp/hl-hacker-help
::yellow hacker-help - pomijam
done
> curl -fLS -o /tmp/hl-hacker-select "https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4/hacker-select"
? ok
> bash -c "mv /tmp/hl-hacker-select $HOME/.hackeros/hacker/hacker-select && chmod 755 $HOME/.hackeros/hacker/hacker-select"
::green hacker-select v
done
? err
> rm -f /tmp/hl-hacker-select
::yellow hacker-select - pomijam
done
> curl -fLS -o /tmp/hl-hacker-docs "https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4/hacker-docs"
? ok
> bash -c "mv /tmp/hl-hacker-docs $HOME/.hackeros/hacker/hacker-docs && chmod 755 $HOME/.hackeros/hacker/hacker-docs"
::green hacker-docs v
done
? err
> rm -f /tmp/hl-hacker-docs
::yellow hacker-docs - pomijam
done
> curl -fLS -o /tmp/hl-HackerOS-Updater "https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4/HackerOS-Updater"
? ok
> bash -c "mv /tmp/hl-HackerOS-Updater $HOME/.hackeros/hacker/HackerOS-Updater && chmod 755 $HOME/.hackeros/hacker/HackerOS-Updater"
::green HackerOS-Updater v
done
? err
> rm -f /tmp/hl-HackerOS-Updater
::yellow HackerOS-Updater - pomijam
done
> curl -fLS -o /tmp/hl-update-system "https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4/update-system"
? ok
> bash -c "mv /tmp/hl-update-system $HOME/.hackeros/hacker/update-system && chmod 755 $HOME/.hackeros/hacker/update-system"
::green update-system v
done
? err
> rm -f /tmp/hl-update-system
::yellow update-system - pomijam
done
;; apt-fronted zwraca 404 w tej wersji - cicha obsluga
> curl -fLS -o /tmp/hl-apt-fronted "https://github.com/HackerOS-Linux-System/Hacker-CLI-Tool/releases/download/v2.4/apt-fronted"
? ok
> bash -c "mv /tmp/hl-apt-fronted $HOME/.hackeros/hacker/apt-fronted && chmod 755 $HOME/.hackeros/hacker/apt-fronted"
::green apt-fronted v
done
? err
> rm -f /tmp/hl-apt-fronted
::yellow apt-fronted - pomijam
done
::green Konfiguracja uzytkownika zaktualizowana v
;; ════════════════════════════════════════════════════════════════════════════════
;; 7. HACKER LANG (hl)
;; ════════════════════════════════════════════════════════════════════════════════
~> [7/8] Aktualizacja Hacker Lang...
^> curl -fLS -o /usr/bin/hl.new "https://github.com/HackerOS-Linux-System/Hacker-Lang/releases/download/v0.3/hl"
? ok
^> mv /usr/bin/hl.new /usr/bin/hl
^> chmod 755 /usr/bin/hl
^> chown root:root /usr/bin/hl
::green Hacker Lang v0.3 v
done
? err
^> rm -f /usr/bin/hl.new
::red BLAD: Hacker Lang - stara wersja zachowana
done
;; ════════════════════════════════════════════════════════════════════════════════
;; 8. PODSUMOWANIE
;; ════════════════════════════════════════════════════════════════════════════════
::nl
::hr 52
::bold [8/8] Aktualizacja HackerOS zakonczona!
::hr 52
::nl