Update Ricing/Windows-7-Theme/install-win7-theme.sh
This commit is contained in:
@@ -36,17 +36,7 @@ for zipname in "${!PACKAGES[@]}"; do
|
||||
|
||||
mkdir -p "$dest"
|
||||
|
||||
# Figure out whether the zip already contains a single top-level folder
|
||||
# (e.g. "Windows 7/") or a bunch of loose files/folders at the root.
|
||||
# If it's a single folder, move that folder's *contents* straight into
|
||||
# the dot-folder so we don't end up with an unnecessary nested dir.
|
||||
mapfile -t top_level < <(find "$extract_dir" -mindepth 1 -maxdepth 1)
|
||||
|
||||
if [[ ${#top_level[@]} -eq 1 && -d "${top_level[0]}" ]]; then
|
||||
src="${top_level[0]}"
|
||||
else
|
||||
src="$extract_dir"
|
||||
fi
|
||||
|
||||
echo "==> Installing into ${dest}..."
|
||||
for item in "$src"/*; do
|
||||
|
||||
Reference in New Issue
Block a user