-
Notifications
You must be signed in to change notification settings - Fork 117
Expand file tree
/
Copy pathimport
More file actions
executable file
·38 lines (26 loc) · 1.48 KB
/
import
File metadata and controls
executable file
·38 lines (26 loc) · 1.48 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
#!/usr/bin/env bash
source "$DOTLY_PATH/scripts/core/_main.sh"
source "$DOTLY_PATH/scripts/package/src/dump.sh"
##? Import previously dumped packages from:
##? * Brew
##? * Python
##? * Volta or NPM
##? * Dart
##?
##? Usage:
##? import
docs::parse "$@"
output::write "🎩 Let's import your packages (this could take a while)"
platform::command_exists brew && output::header "Importing Brew apps from $HOMEBREW_DUMP_FILE_PATH" && package::brew_import
platform::command_exists apt-mark && output::header "Importing Apt apps from $APT_DUMP_FILE_PATH" && package::apt_import
platform::command_exists snap && output::header "Importing Snap apps from $SNAP_DUMP_FILE_PATH" && package::snap_import
platform::command_exists pip3 && output::header "Importing Python apps from $PYTHON_DUMP_FILE_PATH" && package::python_import
platform::command_exists code && output::header "Importing VSCode extensions from $CODE_DUMP_FILE_PATH" && package::code_import
platform::command_exists dart && output::header "Importing Dart packages from $DART_DUMP_FILE_PATH" && package::dart_import
if platform::command_exists volta; then
output::header "Importing Volta apps from $VOLTA_DUMP_FILE_PATH" && package::volta_import
elif platform::command_exists npm; then
output::header "Importing NPM apps from $NPM_DUMP_FILE_PATH" && package::npm_import
fi
platform::command_exists winget.exe && output::header "Importing Winget apps from $WINGET_DUMP_FILE_PATH" && package::winget_import
output::solution 'All packages imported'