mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-26 22:00:29 +00:00
Add ditto
command stub
This commit is contained in:
parent
47c204a243
commit
55bcc0bf89
@ -277,6 +277,7 @@ if (COMPONENT_cli)
|
||||
add_subdirectory(external/lzfse)
|
||||
add_subdirectory(clt)
|
||||
add_subdirectory(diskutil)
|
||||
add_subdirectory(ditto)
|
||||
|
||||
# these aren't used by anything we build (they're just included because they're also present in macOS)
|
||||
# TODO: maybe we should introduce another component (e.g. `lib_stock`) for libraries we don't need but are expected in a stock macOS installation.
|
||||
|
8
src/ditto/CMakeLists.txt
Normal file
8
src/ditto/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
project(ditto)
|
||||
|
||||
install(FILES ditto DESTINATION libexec/darling/usr/bin
|
||||
PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
)
|
23
src/ditto/ditto
Executable file
23
src/ditto/ditto
Executable file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# FIXME: implement an actual version of ditto
|
||||
#
|
||||
# This is just a stub that works well enough for xcodebuild.
|
||||
#
|
||||
|
||||
if [ "$#" -lt 3 ]; then
|
||||
>&2 cat <<- 'EOF'
|
||||
ditto command stub
|
||||
|
||||
Only supports "ditto -rsrc <source> <dest>"
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" != "--rsrc" ] && [ "$1" != "-rsrc" ]; then
|
||||
>&2 echo "Bad argument #1; expected -rsrc or --rsrc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -a "$2" "$3"
|
Loading…
Reference in New Issue
Block a user