-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdebootstrap
More file actions
executable file
·37 lines (33 loc) · 841 Bytes
/
Copy pathdebootstrap
File metadata and controls
executable file
·37 lines (33 loc) · 841 Bytes
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
#!/bin/sh
# debootstrap.sh
# A script to deinit all or specific submodules with user permission.
# Get the list of submodules to process.
# If arguments are provided, use them as the list.
# Otherwise, process all submodules.
if [ $# -gt 0 ]; then
SUBMODULES="$*"
echo "Specified submodules: $SUBMODULES"
else
SUBMODULES="binutils-os2 gcc-os2 libc cmake-os2"
echo "All submodules: $SUBMODULES"
fi
# Confirm with the user
echo "This will deinit the following submodules: $SUBMODULES"
printf '%s' "Are you sure you want to proceed? (y/N) "
read confirm
case "$confirm" in
[Yy])
for sub in $SUBMODULES; do
if test -L "$sub"; then
sub=$(readlink "$sub")
fi
echo "Deinitializing $sub..."
git submodule deinit -f "$sub"
done
echo "Done."
;;
*)
echo "Aborted."
exit 1
;;
esac